Esempio n. 1
0
    public static HealthOverallMessage SendToAll(GameObject entityToUpdate, float overallHealth)
    {
        HealthOverallMessage msg = new HealthOverallMessage
        {
            EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId,
            OverallHealth  = overallHealth,
        };

        msg.SendToAll();
        return(msg);
    }
Esempio n. 2
0
    public static HealthOverallMessage Send(GameObject recipient, GameObject entityToUpdate, int overallHealth, ConsciousState consciousState)
    {
        HealthOverallMessage msg = new HealthOverallMessage
        {
            EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId,
            OverallHealth  = overallHealth,
            ConsciousState = consciousState
        };

        msg.SendTo(recipient);
        return(msg);
    }
    public static HealthOverallMessage SendToAll(GameObject entityToUpdate, int overallHealth, ConsciousState consciousState, UI_PressureAlert.PressureChecker pressureStatus, UI_TempAlert.TempChecker tempStatus)
    {
        HealthOverallMessage msg = new HealthOverallMessage
        {
            EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId,
            OverallHealth  = overallHealth,
            ConsciousState = consciousState,
            PressureStatus = pressureStatus,
            TempStatus     = tempStatus,
        };

        msg.SendToAll();
        return(msg);
    }
Esempio n. 4
0
    /// ---------------------------
    /// SEND TO INDIVIDUAL CLIENT
    /// ---------------------------

    void SendOverallUpdate(GameObject requestor)
    {
        HealthOverallMessage.Send(requestor, gameObject, livingHealthBehaviour.OverallHealth,
                                  livingHealthBehaviour.ConsciousState);
    }
Esempio n. 5
0
    /// ---------------------------
    /// SEND TO ALL SERVER --> CLIENT
    /// ---------------------------

    void SendOverallUpdate()
    {
        HealthOverallMessage.SendToAll(gameObject, livingHealthBehaviour.OverallHealth,
                                       livingHealthBehaviour.ConsciousState);
    }
Esempio n. 6
0
 void SendOverallUpdate()
 {
     HealthOverallMessage.SendToAll(gameObject, livingHealthBehaviour.OverallHealth,
                                    livingHealthBehaviour.ConsciousState, livingHealthBehaviour.PressureStatus,
                                    livingHealthBehaviour.TempStatus);
 }
Esempio n. 7
0
 void SendOverallUpdate()
 {
     HealthOverallMessage.Send(gameObject, gameObject, livingHealthBehaviour.OverallHealth);
 }