示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (cardHand.CardUsing)
     {
         if (CrossPlatformInputManager.GetButtonUp("pointer1"))
         {
             if (cardHand.CardUsing.GetComponent <CardSummon>() != null)
             {
                 OnItemCreate();
                 OldTileOver = null;
             }
             else if (cardHand.CardUsing.GetComponent <CardSpell>() != null)
             {
                 if (OldTileOver != null)
                 {
                     onSpellUse();
                 }
                 OldTileOver = null;
             }
         }
         if (CrossPlatformInputManager.GetButtonDown("Cancel"))
         {
             if (OldTileOver != null)
             {
                 if (OldTileOver.cardType == CardType.Open)
                 {
                     OldTileOver.DestroyImage();
                 }
                 OldTileOver = null;
             }
             SpawnTiles = mageSpawner.CheckTilesAround();
             foreach (EnviromentTile tile in SpawnTiles)
             {
                 tile.ChangeColor(tile.MatColorOriginal);
             }
         }
     }
 }