public void SetPhase(GamePhase gamePhase) { if (gamePhase == null) { Log.WriteLine("GamePhase is null", this, "SetPhase"); return; } this.gamePhase?.OnStop(); this.gamePhase = gamePhase; this.gamePhase?.OnStart(); }
public void SetPhase(string phaseName) { SetPhase(GamePhase.Get(phaseName)); }