Exemplo n.º 1
0
        //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);
        }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 5
0
 private void UpdateClientUI(int newHealth)
 {
     UpdateUIMessage.Send(gameObject, newHealth);
 }
Exemplo n.º 6
0
    /// <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);
    }