//Server calls to update the UI public void UpdateHealthUI(UpdateUIMessage validateMsg, int curHealth) { if (validateMsg == null) //can only be called from server msg { return; } DetermineUIDisplay(curHealth); }
public static UpdateUIMessage Send(ControlDisplays.Screens screen) { UpdateUIMessage msg = new UpdateUIMessage { Screen = screen }; msg.SendToAll(); return(msg); }
/// <summary> /// At the moment it is used to pass the current health of the player /// to the players UI from the server. This should be expanded for other /// UI related things later /// </summary> /// <param name="recipient">Recipient.</param> /// <param name="cHealth">Current server health.</param> public static UpdateUIMessage Send(GameObject recipient, int cHealth) { UpdateUIMessage msg = new UpdateUIMessage { Recipient = recipient.GetComponent <NetworkIdentity>().netId, CurHealth = cHealth }; msg.SendTo(recipient); return(msg); }
/// <summary> /// Begin the round /// </summary> public override void StartRound() { Logger.Log("Starting NukeOps round!", Category.GameMode); // TODO remove once random antag allocation is done UpdateUIMessage.Send(ControlDisplays.Screens.TeamSelect); }
private void UpdateClientUI(int newHealth) { UpdateUIMessage.Send(gameObject, newHealth); }
/// <summary> /// Determine what to do with new players that join /// </summary> // public virtual void SetupNewPlayer() // { // if (GameManager.Instance.RoundStarted) // { // UIManager.Display.SetScreenForJobSelect(); // } // } /// <summary> /// Start the round /// </summary> public virtual void StartRound() { // TODO remove once random job allocation is done UpdateUIMessage.Send(ControlDisplays.Screens.JobSelect); }