Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.tag == "Comparison") {
         if (!FCCBox.isComplete) {
             comparisonBoxCollider = collider;
             comparisonBox = collider.GetComponent<ComparisonBox>();
         }
     }
     if (collider.tag == "MouseDetector") {
         if (comparisonBox != null) {
             if (comparisonBox.pressed) {
                 attachCollider();
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void setComparison(GameObject comparisonObject)
 {
     comparisonBoxCollider = comparisonObject.GetComponent<Collider2D>();
     comparisonBox = comparisonObject.GetComponent<ComparisonBox>();
 }