protected virtual void Fight() { if (this.SpawnWorld != null) { var oldWorld = this.SpawnWorld; this.SpawnWorld = null; // move to real world foreach (ArenaClient c in players) { if (c.IsCharacter) { InitialSpawnClient(c, false); } else { JoinAsSpectator(c); } } oldWorld.Delete(); } SetPhase(GamePhase.Fight); phaseTimer.SetInterval(Scenario.FightDuration); phaseTimer.SetCallback(FadeOut); phaseTimer.Restart(); }
public void StartInactivityTimer() { if (chatInactivityTimer.Started) { chatInactivityTimer.Restart(); } else { chatInactivityTimer.Start(); } }
static void EndHorde(bool victory) { if (victory) { SetPhase(HordePhase.Victory); players.ForEach(p => p.Character.LiftUnconsciousness()); } else { SetPhase(HordePhase.Lost); players.ForEach(p => p.Character.SetHealth(0)); } gameTimer.SetCallback(StartHorde); gameTimer.SetInterval(30 * TimeSpan.TicksPerSecond); gameTimer.Restart(); }