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