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

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

        msg.SendTo(recipient);
        return(msg);
    }