public override void AddedToFieldHook() { base.AddedToFieldHook(); LeftSpawner = new HideAct(new EnemySpawner(0, Y, RemainingEnemiesLeft, LeftSpawnCallback)); RightSpawner = new HideAct(new EnemySpawner((float)Field.Size.Width, Y, RemainingEnemiesRight, RightSpawnCallback)); Field.AddActor(LeftSpawner); Field.AddActor(RightSpawner); }
public override void DeleteActorHook() { base.DeleteActorHook(); LeftSpawner.DeleteActor(); RightSpawner.DeleteActor(); LeftSpawner = null; RightSpawner = null; }
public void Hide() { HideAct?.Invoke(); }