示例#1
0
    public void ResetScene()
    {
        for (int i = 0; i < InteractableConfig.ActionsPerSite; i++)
        {
            InteractablePathManager.UndoLastAction();
        }

        InteractablePathManager.ShowLevelComplete = false;
        GameManager.State = GameManager.PrevState;
        ToggleOff();
    }
示例#2
0
    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.");
        }
    }
示例#3
0
    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);
    }
示例#4
0
 public void Undo()
 {
     InteractablePathManager.UndoLastAction();
 }