/////////////////////////////////////////////////////////////////// // Overridden Godot callbacks //////////////////////////////////////////////////////////////////// public override void _Ready() { base._Ready(); State = new StateManager <Unit>(); hpDisplay = Spawner.Spawn("HpDisplay").In(this).As <HpDisplay>(); colorTag = Spawner.Spawn("ColorTag").In(this).As <ColorTag>(); AddChild(State); SetStats(); SetAbilities(); hpDisplay.SetValue(Hp); AddToGroup("units"); SpawnAction(); State.Change <BasicIdleState>(); }
private void Awake() { Instance = this; }