private void OnTriggerEnter2D(Collider2D collider) { if (collider.tag == "Player") //Player inside trigger area { OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); } }
private void OnTriggerEnter2D(Collider2D collider) { if (collider.CompareTag("Player") && QuestValues.Instance.GetStage(questName) != 2) { OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); } }
private void OnTriggerEnter2D(Collider2D collider) { PlayerController player = collider.GetComponent <PlayerController>(); if (player != null) { OnPlayerEnterTrigger.Invoke(this, EventArgs.Empty); } }
private void OnTriggerEnter2D(Collider2D collider) { PlayerScript player = collider.GetComponent <PlayerScript>(); if (player != null) { Debug.Log("Player inside trigger!"); OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); } }
private void OnTriggerEnter(Collider other) { Player player = other.GetComponent <Player>(); if (player != null) { //Player enters to trigger. OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); } }
private void OnTriggerEnter2D(Collider2D collider) { Player player = collider.GetComponent <Player>(); if (player != null) { // Player inside trigger area! OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); } }
private void OnTriggerEnter2D(Collider2D other) { Character player = other.GetComponent <PlayerMovement>(); if (player != null) { //Its the player inside the triggerArea Debug.Log("Player enters BossArea!"); OnPlayerEnterTrigger?.Invoke(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.layer != LayerMask.NameToLayer("Player")) { return; } doors.SetActive(true); OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); gameObject.SetActive(false); }
private void OnTriggerEnter(Collider collider) { PlayerController player = collider.GetComponent <PlayerController>(); if (player != null) { GameManager.wave = nowWeve; lastDoor.CloseDoor(); Debug.Log("Player Enemy Trigger"); OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); Destroy(gameObject); } }
private void OnTriggerEnter(Collider collider) { if (!PV.IsMine) { return; } OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); //https://answers.unity.com/questions/554003/check-if-player-is-colliding-with-a-trigger.html if (collider.gameObject.tag == "Player") { // Player inside trigger area Debug.Log("Player inside boss area."); OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty); } }