コード例 #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;
    }
コード例 #2
0
ファイル: Button.cs プロジェクト: jreala/Numbers
 void Awake()
 {
     undo          = gameObject.GetComponentInParent <UndoMove>();
     tileCondition = gameObject.GetComponentInParent <TileCondition>();
     scoreScript   = gameObject.GetComponentInParent <ScoreScript>();
 }
コード例 #3
0
        private void UndoMove_Click(object sender, EventArgs e)
        {
            UndoMove undoMove = new UndoMove("Cofnij", "Czy na pewno chcesz cofnąć ruch?");

            undoMove.ShowDialog();
        }
コード例 #4
0
ファイル: Button.cs プロジェクト: jreala/Numbers
 void Awake()
 {
     undo = gameObject.GetComponentInParent<UndoMove>();
     tileCondition = gameObject.GetComponentInParent<TileCondition>();
     scoreScript = gameObject.GetComponentInParent<ScoreScript>();
 }