Example #1
0
    void OnTriggerEnter2D(Collider2D otherCollider)
    {
        MoveRect ta = otherCollider.gameObject.GetComponent <MoveRect>();

        if (ta != null)
        {
            checkPos = true;
        }
    }
Example #2
0
    void OnTriggerEnter2D(Collider2D otherCollider)
    {
        MoveRect   ta  = otherCollider.gameObject.GetComponent <MoveRect>();
        MoveTri    ta1 = otherCollider.gameObject.GetComponent <MoveTri>();
        MoveCircle ta2 = otherCollider.gameObject.GetComponent <MoveCircle>();

        if (ta != null || ta1 != null || ta2 != null)
        {
            theCounter1 += 1;
        }
    }
Example #3
0
 private void Awake()
 {
     audioManager = FindObjectOfType <AudioManager>();
     moveRect     = FindObjectOfType <MoveRect>();
 }