Пример #1
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);
    }
Пример #2
0
 void SendRespiratoryUpdate()
 {
     HealthRespiratoryMessage.SendToAll(gameObject, livingHealthBehaviour.respiratorySystem.IsBreathing,
                                        livingHealthBehaviour.respiratorySystem.IsSuffocating);
 }