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); }
void SendRespiratoryUpdate() { HealthRespiratoryMessage.SendToAll(gameObject, livingHealthBehaviour.respiratorySystem.IsBreathing, livingHealthBehaviour.respiratorySystem.IsSuffocating); }