public static HealthRespiratoryMessage Send(GameObject entityToUpdate, bool IsSuffocating)
    {
        HealthRespiratoryMessage msg = new HealthRespiratoryMessage
        {
            IsSuffocating = IsSuffocating
        };

        msg.SendTo(entityToUpdate);
        return(msg);
    }
Esempio n. 2
0
    public static HealthRespiratoryMessage SendToAll(GameObject entityToUpdate, bool isBreathing, bool IsSuffocating)
    {
        HealthRespiratoryMessage msg = new HealthRespiratoryMessage
        {
            EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId,
            IsBreathing    = isBreathing,
            IsSuffocating  = IsSuffocating
        };

        msg.SendToAll();
        return(msg);
    }
Esempio n. 3
0
 void SendRespiratoryUpdate(GameObject requestor)
 {
     HealthRespiratoryMessage.Send(requestor, gameObject, livingHealthBehaviour.respiratorySystem.IsBreathing,
                                   livingHealthBehaviour.respiratorySystem.IsSuffocating);
 }
Esempio n. 4
0
 void SendRespiratoryUpdate()
 {
     HealthRespiratoryMessage.SendToAll(gameObject, livingHealthBehaviour.respiratorySystem.IsBreathing,
                                        livingHealthBehaviour.respiratorySystem.IsSuffocating);
 }
Esempio n. 5
0
 void SendRespiratoryUpdate()
 {
     HealthRespiratoryMessage.Send(gameObject, isSuffocatingCache);
 }