static void SetPhase(HordePhase phase) { string screenMsg; switch (phase) { case HordePhase.WarmUp: screenMsg = "warmup"; break; case HordePhase.Fight: screenMsg = "Fight!"; break; case HordePhase.Stand: screenMsg = "Stand"; break; case HordePhase.Victory: screenMsg = "Sieg!"; HordeBoardScreen.Instance.Open(); break; case HordePhase.Lost: screenMsg = "Niederlage!"; HordeBoardScreen.Instance.Open(); break; default: return; } Phase = phase; ScreenScrollText.AddText(screenMsg, GUI.GUCView.Fonts.Menu); OnPhaseChange?.Invoke(phase); }
public static void ReadPhaseMessage(PacketReader stream) { HordePhase phase = (HordePhase)stream.ReadByte(); SetPhase(phase); if (phase == HordePhase.Stand) { int index = stream.ReadByte(); StartStand(activeDef.Stands[index]); } else { Endstand(); } }
public static void ReadGameInfo(PacketReader stream) { string name = stream.ReadString(); activeDef = HordeDef.GetDef(name); HordePhase phase = (HordePhase)stream.ReadByte(); if (phase == HordePhase.Stand) { int index = stream.ReadByte(); StartStand(activeDef.Stands[index]); } else { Endstand(); } SetPhase(phase); }
static void SetPhase(HordePhase phase) { if (Phase == phase) { return; } Phase = phase; var stream = ArenaClient.GetScriptMessageStream(); stream.Write((byte)ScriptMessages.HordePhase); stream.Write((byte)Phase); if (Phase == HordePhase.Stand) { stream.Write((byte)ActiveStandInst.Index); } ArenaClient.ForEach(c => c.SendScriptMessage(stream, NetPriority.Low, NetReliability.ReliableOrdered)); OnPhaseChange?.Invoke(phase); }
void SetTitle(HordePhase phase) { this.board.SetTitle(phase.ToString()); }