示例#1
0
    //player was attacked

    public void wasAttacked(int attackerID)
    {
        //player is vurnerable
        if (isVurnerable)
        {
            //Attacked (attackerID);
            photonView.RPC("Attacked", PhotonTargets.All, attackerID, false);
            isVurnerable = false;
            if (ismine && !isAI)
            {
                attbutt.GetComponent <SpriteRenderer> ().color = new Color(1, 1, 1, 0.5f);
            }
            if (isAI)
            {
                aictrl.Stop();
            }
        }
    }