Example #1
0
 void OnTriggerEnter2D(Collider2D c)
 {
     //Debug.Log("entered goal zone");
     if (isOccupied)
     {
         return;
     }
     if (c.tag != TagToRespondTo)
     {
         return;
     }
     //Debug.Log("accepted tag");
     isOccupied = true;
     protectMan.SendMessage("inEndZone");
     startTime = Time.timeSinceLevelLoad;
     StartCoroutine(CountDown());
 }
Example #2
0
        void OnTriggerEnter2D(Collider2D c)
        {
            if (c.tag != "Player")
            {
                return;
            }

            if (protectMan != null)
            {
                protectMan.SendMessage("DoorDown");
            }
            //Debug.Log("Door triggered");
            //add explosion particle effect call here
            //Destroy(transform.root.gameObject);
            transform.root.gameObject.SetActive(false);
            PolyNav2D.current.GenerateMap();
        }