Beispiel #1
0
    void OnTriggerExit2D(Collider2D col)
    {
        bool isOutsideWall = !col.IsTouching(GetComponentInChildren <Collider2D>());

        if (col.tag == "DeathWall" && isOutsideWall)
        {
            myAudioSrc.Play();
            CamManager.DeathShake(CamManager.GetTarget().name == gameObject.name);

            OnDeath(lastHitBy, ID);
        }
    }
Beispiel #2
0
    void OnTriggerExit2D(Collider2D col)
    {
        if (col.tag != "DeathWall")
        {
            return;
        }
        myAudioSrc.Play();
        CamManager.DeathShake(_PhotonView.isMine);

        if (!_PhotonView.isMine)
        {
            return;
        }

        _PhotonView.RPC("OnDeath", PhotonTargets.All, lastHitBy, SlotNum);
    }
    void OnTriggerExit2D(Collider2D col)
    {
        bool isOutsideWall = !col.IsTouching(GetComponentInChildren <Collider2D>());

        if (col.tag == "DeathWall" && isOutsideWall)
        {
            myAudioSrc.Play();
            CamManager.DeathShake(CamManager.GetTarget().name == gameObject.name);

            if (!_PhotonView.isMine)
            {
                return;
            }

            _PhotonView.RPC("OnDeath", PhotonTargets.All, lastHitBy, SlotNum);
        }
    }