Пример #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);
        }
    }
    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);
        }
    }
Пример #3
0
    void Update()
    {
        UpdateHurt();
        if (CamManager.GetTarget().gameObject.name != gameObject.name)
        {
            return;
        }

        //CBUG.Log("OOOH I AM" + name);
        //Jump Detection Only, no physics handling.
        if (controlsPaused)
        {
            moveLeft  = 0;
            moveRight = 0;
            return;
        }

        updateSpecials();
        updateJumping();
        updateDownJumping();
        updateAttacks();
        updateMovement();
    }