Beispiel #1
0
 public void HighlightGrid()
 {
     if (playerAP.GetCurrentAP() > 0)
     {
         deckManager.DisableCardUsage();
         List <Vector2Int> highlightPositions = PossibleMovementTiles();
         for (int index = 0; index < highlightPositions.Count; index++)
         {
             GameObject tile = battleGrid.transform.GetChild(highlightPositions[index].x).GetChild(highlightPositions[index].y).gameObject;
             tile.GetComponent <Button>().enabled = true;
             tile.GetComponent <Image>().color    = flashColor;
             selectingPosition = true;
         }
     }
 }
Beispiel #2
0
 public void UseCard()
 {
     if (playerAP.GetCurrentAP() >= apCost)
     {
         GetComponent <EventTrigger>().enabled = false;
         deckManager.DisableCardUsage();
         battleManager.SetCard(this);
         for (int index = 0; index < attackTiles.Count; index++)
         {
             battleGrid.transform.GetChild(attackTiles[index].x).GetChild(attackTiles[index].y).GetComponent <Button>().enabled = true;
         }
         // play attack animation
         // gridManager.AttackEnemyPositions(attackTiles, damage);
         // UnlightCard();
     }
 }