mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
25 lines
804 B
C#
25 lines
804 B
C#
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.IoC;
|
|
|
|
namespace Robust.Client.GameObjects;
|
|
|
|
/// <summary>
|
|
/// An abstract entity system inheritor for systems that deal with appearance data.
|
|
/// </summary>
|
|
public abstract class VisualizerSystem<T> : EntitySystem
|
|
where T: Component
|
|
{
|
|
[Dependency] protected readonly AppearanceSystem AppearanceSystem = default!;
|
|
[Dependency] protected readonly AnimationPlayerSystem AnimationSystem = default!;
|
|
[Dependency] protected readonly SpriteSystem SpriteSystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<T, AppearanceChangeEvent>(OnAppearanceChange);
|
|
}
|
|
|
|
protected virtual void OnAppearanceChange(EntityUid uid, T component, ref AppearanceChangeEvent args) {}
|
|
}
|