Beispiel #1
0
 public static void ActivateButton()
 {
     OnEnterGame.CancelTacticHighlight();
     if (pieceInfo.trigger != null && !pieceInfo.trigger.Activatable())
     {
         return;
     }
     actor               = "ability";
     targetLocs          = pieceInfo.ValidTarget();
     button.interactable = true;
     textObj.SetActive(true);
     if (targetLocs.Count == 0)
     {
         text.text = "Activate\nAbility";
     }
     else
     {
         text.text = "Show\nTargets";
     }
 }
Beispiel #2
0
 public void ButtonDrawTargets()
 {
     OnEnterGame.CancelTacticHighlight();
     if (targetLocs.Count == 0)
     {
         // if not targets, trigger directly
         if (!GameController.ChangeOre(-pieceInfo.trigger.piece.oreCost))
         {
             return;
         }
         pieceInfo.trigger.Activate();
         MovementController.PutDownPiece();
         // Database Down Error
         //OnEnterGame.gameInfo.Act("ability", Login.playerID);
         //if (!OnEnterGame.gameInfo.Actable(Login.playerID)) onEnterGame.NextTurn();
     }
     else
     {
         DrawTargets();
     }
 }
Beispiel #3
0
 public static void Resume()
 {
     OnEnterGame.CancelTacticHighlight();
     ActivateAbility.RemoveTargets();
     targets.Clear();
 }