Ejemplo n.º 1
0
    public static HealthBloodMessage SendToAll(GameObject entityToUpdate, int heartRate, float bloodLevel,
                                               float oxygenDamage, float toxinLevel)
    {
        HealthBloodMessage msg = new HealthBloodMessage
        {
            EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId,
            HeartRate      = heartRate,
            BloodLevel     = bloodLevel,
            OxygenDamage   = oxygenDamage,
            ToxinLevel     = toxinLevel
        };

        msg.SendToAll();
        return(msg);
    }
Ejemplo n.º 2
0
 void SendBloodUpdate()
 {
     HealthBloodMessage.SendToAll(gameObject, heartRateCache, bloodLevelCache,
                                  oxygenLevelCache, toxinLevelCache);
 }