Beispiel #1
0
    void OnTriggerEnter(Collider b)
    {
        if (b.gameObject.gameObject.layer == LayerMask.NameToLayer("NoCoolDown"))
        {
            NoCoolDown();
            Destroy(b.gameObject);
            resetActivated = true;
            timerObj.SetActive(true);
        }

        if (b.gameObject.gameObject.layer == LayerMask.NameToLayer("TriShot"))
        {
            TrippleShot();
            Destroy(b.gameObject);
            resetActivated = true;
            timerObj.SetActive(true);
        }

        if (b.gameObject.gameObject.layer == LayerMask.NameToLayer("HighJump"))
        {
            _jump.HighJump();
            Destroy(b.gameObject);
        }

        if (b.gameObject.gameObject.layer == LayerMask.NameToLayer("Immunity"))
        {
            gameObject.tag = "Untagged";
            Destroy(b.gameObject);
            resetActivated = true;
            timerObj.SetActive(true);
        }

        if (b.gameObject.gameObject.layer == LayerMask.NameToLayer("Homing"))
        {
            HomingShot();
            Destroy(b.gameObject);
            resetActivated = true;
            timerObj.SetActive(true);
        }

        if (b.gameObject.gameObject.layer == LayerMask.NameToLayer("RestoreHp"))
        {
            _hp.Heal();
            Destroy(b.gameObject);
        }
    }