Exemplo n.º 1
0
 static int Reset(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Nova.Variables obj = (Nova.Variables)ToLua.CheckObject <Nova.Variables>(L, 1);
         obj.Reset();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Reset GameState, make it the same as the game not start
        /// </summary>
        /// <remarks>
        /// No event will be triggered when this method is called
        /// </remarks>
        public void ResetGameState()
        {
            if (CheckActionRunning())
            {
                return;
            }

            // Reset all
            walkedThroughNodes   = null;
            currentNode          = null;
            currentIndex         = 0;
            currentDialogueEntry = null;
            variables.Reset();
            state = State.Normal;

            // Restore scene
            if (checkpointManager.clearSceneRestoreEntry != null)
            {
                RestoreRaw(checkpointManager.clearSceneRestoreEntry);
            }
        }