Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (!tempSelectedUnit)
        {
            tempSelectedUnit = selector.SelectedUnit;
        }
        DebugHUD.setValue("Is dismissed", infoPanel.dismissButton.Dismissed);
        if (match)
        {
            updateGameInfo();
//			if (selector.SelectedUnit) {
//				if (!selector.SelectedUnit.Equals(selectedUnit) || infoPanel.dismissButton.Dismissed) {
            //selectedUnit = selector.SelectedUnit;
            infoPanel.updateSelectedInfo(selectedUnit);
//					infoPanel.gameObject.SetActive(true);
//					infoPanel.dismissButton.Dismissed = false;
//					alreadyDismissed = false;
//				}
//			} else {
////				infoPanel.gameObject.SetActive(false);
//				if (!alreadyDismissed) {
//					infoPanel.dismissButton.Dismissed = true;
//					alreadyDismissed = true;
//				}
//			}
            EndTurn.SetActive(match.MyTurn);
        }
        else
        {
            match = MatchManager.instance;
            displayJumpButtons();
        }
    }
Example #2
0
 public void EditMonster(Monster monster)
 {
     if (currentMonster)
     {
         StopEditingMonster();
     }
     if (monster)
     {
         currentMonster = monster;
         infoPanelSystem.updateSelectedInfo(monster);
         DeleteButton.gameObject.SetActive(true);
         var tile = monster.Tile;
         PreviousHightlightColor = tile.HighlightColor;
         tile.HighlightColor     = EditHighlightColor;
         tile.Highlighted        = true;
     }
 }