public static HealthOverallMessage SendToAll(GameObject entityToUpdate, float overallHealth) { HealthOverallMessage msg = new HealthOverallMessage { EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId, OverallHealth = overallHealth, }; msg.SendToAll(); return(msg); }
public static HealthOverallMessage Send(GameObject recipient, GameObject entityToUpdate, int overallHealth, ConsciousState consciousState) { HealthOverallMessage msg = new HealthOverallMessage { EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId, OverallHealth = overallHealth, ConsciousState = consciousState }; msg.SendTo(recipient); return(msg); }
public static HealthOverallMessage SendToAll(GameObject entityToUpdate, int overallHealth, ConsciousState consciousState, UI_PressureAlert.PressureChecker pressureStatus, UI_TempAlert.TempChecker tempStatus) { HealthOverallMessage msg = new HealthOverallMessage { EntityToUpdate = entityToUpdate.GetComponent <NetworkIdentity>().netId, OverallHealth = overallHealth, ConsciousState = consciousState, PressureStatus = pressureStatus, TempStatus = tempStatus, }; msg.SendToAll(); return(msg); }
/// --------------------------- /// SEND TO INDIVIDUAL CLIENT /// --------------------------- void SendOverallUpdate(GameObject requestor) { HealthOverallMessage.Send(requestor, gameObject, livingHealthBehaviour.OverallHealth, livingHealthBehaviour.ConsciousState); }
/// --------------------------- /// SEND TO ALL SERVER --> CLIENT /// --------------------------- void SendOverallUpdate() { HealthOverallMessage.SendToAll(gameObject, livingHealthBehaviour.OverallHealth, livingHealthBehaviour.ConsciousState); }
void SendOverallUpdate() { HealthOverallMessage.SendToAll(gameObject, livingHealthBehaviour.OverallHealth, livingHealthBehaviour.ConsciousState, livingHealthBehaviour.PressureStatus, livingHealthBehaviour.TempStatus); }
void SendOverallUpdate() { HealthOverallMessage.Send(gameObject, gameObject, livingHealthBehaviour.OverallHealth); }