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(); } } } }
public void OnParticleCollision(GameObject other) { PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>(); if (playerModelCollider != null) { StartCoroutine(DeathCoroutine(delay: 0.75f)); } }
void OnTriggerEnter(Collider other) { PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>(); if (playerModelCollider != null) { _finishedGame.SetActive(true); StartCoroutine(ShutDown(_timeToExit)); } }
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); }
private void OnTriggerEnter(Collider other) { PlayerModelCollider playerModel = other.GetComponent <PlayerModelCollider>(); if (playerModel == null) { return; } playerModel.Player.Death.Die(); }
void OnTriggerEnter(Collider other) { if (_deactivated == false) { PlayerModelCollider playerModelCollider = other.GetComponent <PlayerModelCollider>(); if (playerModelCollider != null) { _playerScr = playerModelCollider.Player; Activate(); } } }
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()); } }