Exemple #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;
    }
Exemple #2
0
 void Awake()
 {
     undo          = gameObject.GetComponentInParent <UndoMove>();
     tileCondition = gameObject.GetComponentInParent <TileCondition>();
     scoreScript   = gameObject.GetComponentInParent <ScoreScript>();
 }
Exemple #3
0
        private void UndoMove_Click(object sender, EventArgs e)
        {
            UndoMove undoMove = new UndoMove("Cofnij", "Czy na pewno chcesz cofnąć ruch?");

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