static int RestrainCheckpoint(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { Nova.CheckpointHelper obj = (Nova.CheckpointHelper)ToLua.CheckObject <Nova.CheckpointHelper>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.RestrainCheckpoint(arg0); return(0); } else if (count == 3) { Nova.CheckpointHelper obj = (Nova.CheckpointHelper)ToLua.CheckObject <Nova.CheckpointHelper>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); obj.RestrainCheckpoint(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Nova.CheckpointHelper.RestrainCheckpoint")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void Awake() { var controller = Utils.FindNovaGameController(); gameState = controller.GameState; variables = gameState.variables; checkpointHelper = controller.CheckpointHelper; var choice = variables.Get <string>("choice"); var count = checkpointHelper.GetGlobalVariable <int>("minigame_count", 0); count += 1; checkpointHelper.SetGlobalVariable("minigame_count", count); text.text = string.Format(text.text, choice, count); closeButton.onClick.AddListener(OnClick); var test_bool = variables.Get <bool>("test_bool"); var test_int = variables.Get <int>("test_int"); var test_float = variables.Get <float>("test_float"); var test_double = variables.Get <double>("test_double"); Debug.Log($"{test_bool} {test_int} {test_float} {test_double}"); variables.Set("test_bool", false); variables.Set("test_int", 321); variables.Set("test_float", 6.54f); variables.Set("test_double", 9.87); }
static int EnsureCheckpointOnNextDialogue(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Nova.CheckpointHelper obj = (Nova.CheckpointHelper)ToLua.CheckObject <Nova.CheckpointHelper>(L, 1); obj.EnsureCheckpointOnNextDialogue(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int UpdateGlobalSave(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Nova.CheckpointHelper obj = (Nova.CheckpointHelper)ToLua.CheckObject <Nova.CheckpointHelper>(L, 1); obj.UpdateGlobalSave(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateNova_CheckpointHelper(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { Nova.CheckpointHelper obj = new Nova.CheckpointHelper(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Nova.CheckpointHelper.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }