Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        if (_deactivated == false)
        {
            PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>();
            if (playerModelCollider != null)
            {
                _playerScr = playerModelCollider.Player;

                if (_puzzlePiecesRequired == true)
                {
                    if (_puzzlePieceNumber == _playerScr.GetComponent <PlayerInventoryList>().puzzlePieceNumber)
                    {
                        Activate();
                    }
                    else
                    {
                        _missingSomethingGlow.SetActive(true);
                    }
                }
                else
                {
                    Activate();
                }
            }
        }
    }
Esempio n. 2
0
    public void OnParticleCollision(GameObject other)
    {
        PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>();

        if (playerModelCollider != null)
        {
            StartCoroutine(DeathCoroutine(delay: 0.75f));
        }
    }
Esempio n. 3
0
    void OnTriggerEnter(Collider other)
    {
        PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>();

        if (playerModelCollider != null)
        {
            _finishedGame.SetActive(true);
            StartCoroutine(ShutDown(_timeToExit));
        }
    }
Esempio n. 4
0
    private void OnTriggerEnter(Collider other)
    {
        PlayerModelCollider playerModel = other.gameObject.GetComponent <PlayerModelCollider>();

        if (playerModel == null)
        {
            return;
        }

        playerModel.Player.Death.GetPushedAndDie(isGoingRight ? Vector3.right : Vector3.left, PushForce);
    }
Esempio n. 5
0
    private void OnTriggerEnter(Collider other)
    {
        PlayerModelCollider playerModel = other.GetComponent <PlayerModelCollider>();

        if (playerModel == null)
        {
            return;
        }

        playerModel.Player.Death.Die();
    }
Esempio n. 6
0
 void OnTriggerEnter(Collider other)
 {
     if (_deactivated == false)
     {
         PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>();
         if (playerModelCollider != null)
         {
             _playerScr = playerModelCollider.Player;
             Activate();
         }
     }
 }
Esempio n. 7
0
    void OnTriggerEnter(Collider other)
    {
        PlayerModelCollider player = other.GetComponent <PlayerModelCollider>();

        if (player != null)
        {
            _playerTransform = player.Player.transform;
            _enteringCanvasObj.SetActive(true);
            _obstacleWall.SetActive(false);
            player.Player.Respawn.RespawnAt(_exitPoint.transform.position);
            StartCoroutine(Teleport());
        }
    }