public void ResetScene() { for (int i = 0; i < InteractableConfig.ActionsPerSite; i++) { InteractablePathManager.UndoLastAction(); } InteractablePathManager.ShowLevelComplete = false; GameManager.State = GameManager.PrevState; ToggleOff(); }
public void Undo() { int actionsThisScene = InteractableLog.Count % InteractableConfig.ActionsPerSite; if (actionsThisScene > 0) { InteractablePathManager.UndoLastAction(); } else { Debug.Log("Unable to undo actions from a previous scene."); } }
public void replayScene() { // remove any actions performed in the current scene from the interactable log // calculate # of actions to undo int actionsThisScene = InteractableLog.Count % InteractableConfig.ActionsPerSite; //Debug.Log("Found " + actionsThisScene + " actions to undo"); if (actionsThisScene > 0) { for (int i = 0; i < actionsThisScene; i++) { InteractablePathManager.UndoLastAction(); Debug.Log("Undo number " + (i + 1)); } InteractablePathManager.ShowLevelComplete = false; } GameManager.State = GameManager.PrevState; gameObject.SetActive(false); }
public void Undo() { InteractablePathManager.UndoLastAction(); }