Esempio n. 1
0
    public void AddUndoMove(UndoMove action)
    {
        undoActions.Add(action);
        movesText.text = (int.Parse(movesText.text) + 1).ToString();
        int OldPoints = int.Parse(pointsText.text);

        pointsText.text = Mathf.Max(int.Parse(pointsText.text) + action.points, 0).ToString();
        action.points   = OldPoints;
    }
Esempio n. 2
0
 void Awake()
 {
     undo          = gameObject.GetComponentInParent <UndoMove>();
     tileCondition = gameObject.GetComponentInParent <TileCondition>();
     scoreScript   = gameObject.GetComponentInParent <ScoreScript>();
 }
Esempio n. 3
0
        private void UndoMove_Click(object sender, EventArgs e)
        {
            UndoMove undoMove = new UndoMove("Cofnij", "Czy na pewno chcesz cofnąć ruch?");

            undoMove.ShowDialog();
        }
Esempio n. 4
0
 void Awake()
 {
     undo = gameObject.GetComponentInParent<UndoMove>();
     tileCondition = gameObject.GetComponentInParent<TileCondition>();
     scoreScript = gameObject.GetComponentInParent<ScoreScript>();
 }