Esempio n. 1
0
 void OnMouseUp()
 {
     if (myHasScored == true)
     {
         return;
     }
     wasPressed = false;
     if (myIsInsideGoal == true && myGoalHover != null)
     {
         if (myGoalHover.myGoalType == myTileType)
         {
             GameEventManager.ScorePoint(this, 1);
             myHasScored        = true;
             transform.position = myGoalHover.transform.position;
             myGoalHover        = null;
             if (myHasStartedLowHealthTween == true)
             {
                 iTween.Stop(gameObject);
             }
         }
         else
         {
             GameEventManager.GameLost();
         }
     }
     //GetComponent<BoxCollider2D>().enabled = true;
 }