예제 #1
0
 void TileWsaPressed(GameObject g)
 {
     if (!GameUI.EmojiCrushActivated)
     {
         SwappedPosition1 = new Vector2(-1, -1);
         SwappedPosition2 = new Vector2(-1, -1);
         if (currentlySelected != null)
         {
             if (currentlySelected == g)
             {
                 toggleSelectedGlowEffect(true);
                 currentlySelected = null;
             }
             else
             {
                 toggleSelectedGlowEffect(true);
                 SwappedPosition1 = currentlySelected.GetComponent <TileController>().location;
                 SwappedPosition2 = g.GetComponent <TileController>().location;
                 SwapTiles(currentlySelected, g);
                 currentlySelected = null;
             }
         }
         else
         {
             currentlySelected = g;
             toggleSelectedGlowEffect(false);
         }
     }
     else
     {
         EmojiCrushActivate(g);
         PowerUpController.Back();
     }
 }