Area2.OnTriggerEnter C# (CSharp) Method

OnTriggerEnter() public method

public OnTriggerEnter ( Collider col ) : void
col Collider
return void
    void OnTriggerEnter(Collider col)
    {
        Debug.Log ("*************************" + area2);
        //if not the player colliding
        if(!col.gameObject.tag.Equals("Player"))
            return;

        if(area2)
        {
            Popup.mainPopup.popup("You've entered The Rainy Grove!");
        }
        else
        {
            Popup.mainPopup.popup("You don't have enough magic for the Rainy Grove yet.");
        }
    }