Ejemplo n.º 1
0
    public void UpdateHealthForEnemy(int id, int health)
    {
        NetworkTransformReceiver rec = GetRecipient(id);

        rec.GetComponent <Enemy>().UpdateHealth(health);

        BloodEffect(rec.transform);
    }
Ejemplo n.º 2
0
    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);
        }
    }