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:
metalgearsloth
2020-11-14 00:27:13 +11:00
committed by GitHub
parent baa71e4ff0
commit 4f03c81ddc
4 changed files with 71 additions and 23 deletions

View File

@@ -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;
}
}
}
}