void AddStage(ActorStage stage) { if (Stage == stage) { return; //leave well enough alone } if (Stage != null) { DestroyStage(); } Stage = stage; AddActor(stage); }
public override bool AddActor(IActor actor) { if (base.AddActor(actor)) { if (actor.GetActorType() == ActorType.Stage) { Debug.Log("ooh, look: a stage"); Stage = actor as ActorStage; } return(true); } return(false); }
void DestroyStage() { base.RemoveAndDestroyActor(Stage); Stage = null; }