public void UpdateHealthForEnemy(int id, int health) { NetworkTransformReceiver rec = GetRecipient(id); rec.GetComponent <Enemy>().UpdateHealth(health); BloodEffect(rec.transform); }
public void SyncAnimation(int id, string msg, int layer) { NetworkTransformReceiver rec = GetRecipient(id); if (rec == null) { return; } if (layer == 0) { rec.GetComponent <AnimationSynchronizer>().RemoteStateUpdate(msg); } else if (layer == 1) { rec.GetComponent <AnimationSynchronizer>().RemoteSecondStateUpdate(msg); } }