private void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.tag == "Player") //Player inside trigger area
     {
         OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty);
     }
 }
Esempio n. 2
0
 private void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.CompareTag("Player") && QuestValues.Instance.GetStage(questName) != 2)
     {
         OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty);
     }
 }
Esempio n. 3
0
    private void OnTriggerEnter2D(Collider2D collider)
    {
        PlayerController player = collider.GetComponent <PlayerController>();

        if (player != null)
        {
            OnPlayerEnterTrigger.Invoke(this, EventArgs.Empty);
        }
    }
Esempio n. 4
0
    private void OnTriggerEnter2D(Collider2D collider)
    {
        PlayerScript player = collider.GetComponent <PlayerScript>();

        if (player != null)
        {
            Debug.Log("Player inside trigger!");
            OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty);
        }
    }
Esempio n. 5
0
    private void OnTriggerEnter(Collider other)
    {
        Player player = other.GetComponent <Player>();

        if (player != null)
        {
            //Player enters to trigger.
            OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty);
        }
    }
Esempio n. 6
0
    private void OnTriggerEnter2D(Collider2D collider)
    {
        Player player = collider.GetComponent <Player>();

        if (player != null)
        {
            // Player inside trigger area!
            OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty);
        }
    }
Esempio n. 7
0
    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();
        }
    }
Esempio n. 8
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.layer != LayerMask.NameToLayer("Player"))
        {
            return;
        }

        doors.SetActive(true);
        OnPlayerEnterTrigger?.Invoke(this, EventArgs.Empty);

        gameObject.SetActive(false);
    }
Esempio n. 9
0
    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);
     }
 }