DummyIcon test (#2515)
* DummyIcon test Also the relevant fixes. * Unbox this * 3rd string * Update Content.Client/GameObjects/Components/Kitchen/MicrowaveVisualizer.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -13,13 +13,20 @@ namespace Content.Client.GameObjects.Components.Crayon
|
||||
|
||||
var sprite = component.Owner.GetComponent<SpriteComponent>();
|
||||
|
||||
var state = component.GetData<string>(CrayonVisuals.State);
|
||||
var color = component.GetData<Color>(CrayonVisuals.Color);
|
||||
var rotation = component.GetData<Angle>(CrayonVisuals.Rotation);
|
||||
if (component.TryGetData(CrayonVisuals.State, out string state))
|
||||
{
|
||||
sprite.LayerSetState(0, state);
|
||||
}
|
||||
|
||||
sprite.LayerSetState(0, state);
|
||||
sprite.LayerSetColor(0, color);
|
||||
sprite.Rotation = rotation;
|
||||
if (component.TryGetData(CrayonVisuals.Color, out Color color))
|
||||
{
|
||||
sprite.LayerSetColor(0, color);
|
||||
}
|
||||
|
||||
if (component.TryGetData(CrayonVisuals.Rotation, out Angle rotation))
|
||||
{
|
||||
sprite.Rotation = rotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user