Beispiel #1
0
 protected override void OnTriggerExit(Collider collider)
 {
     if (!parentFollowKey.getBeingHeld())
     {
         Destroy(transform.parent.gameObject);
         Debug.Log("Miss");
     }
 }
 protected override void OnTriggerStay(Collider collider)
 {
     if (!parentKey.perfect)
     {
         if (Time.time > parentKey.spawnTime - 0.1)
         {
             if (collider.transform.tag == "Arrow")
             {
                 parentKey.perfect = true;
             }
         }
     }
     else
     {
         if (parentFollowKey.getBeingHeld())
         {
             ScoreController.getInstance().addPerfectScore();
             Destroy(transform.parent.gameObject);
             Debug.Log("Perfect");
         }
     }
 }