void OnEnable() { // Make the functions available to Lua: Lua.RegisterFunction("SendMessageSystem", this, SymbolExtensions.GetMethodInfo(() => SendMessageSystem(string.Empty, string.Empty))); Lua.RegisterFunction("SendMessageSystemString", this, SymbolExtensions.GetMethodInfo(() => SendMessageSystemString(string.Empty, string.Empty, string.Empty))); Lua.RegisterFunction("SendMessageSystemInt", this, SymbolExtensions.GetMethodInfo(() => SendMessageSystemInt(string.Empty, string.Empty, (double)0))); }
private void OnEnable() { Lua.RegisterFunction("PushConversationPosition", null, SymbolExtensions.GetMethodInfo(() => PushConversationPosition())); Lua.RegisterFunction("PopConversationPosition", null, SymbolExtensions.GetMethodInfo(() => PopConversationPosition())); Lua.RegisterFunction("ClearConversationPositionStack", null, SymbolExtensions.GetMethodInfo(() => ClearConversationPositionStack())); s_pushCurrentEntry = pushCurrentEntry; }
public void RegisterLuaFunctions() { Lua.RegisterFunction("NetSetBool", this, SymbolExtensions.GetMethodInfo(() => NetSetBool(string.Empty, false))); Lua.RegisterFunction("NetSetNumber", this, SymbolExtensions.GetMethodInfo(() => NetSetNumber(string.Empty, (double)0))); Lua.RegisterFunction("NetSetString", this, SymbolExtensions.GetMethodInfo(() => NetSetString(string.Empty, string.Empty))); Lua.RegisterFunction("NetSetQuestState", this, SymbolExtensions.GetMethodInfo(() => NetSetQuestState(string.Empty, string.Empty))); Lua.RegisterFunction("NetSetQuestEntryState", this, SymbolExtensions.GetMethodInfo(() => NetSetQuestEntryState(string.Empty, (double)0, string.Empty))); }
/// <summary> /// Registers the Chat Mapper functions into the Lua environment. /// </summary> private static void RegisterChatMapperFunctions() { Lua.RegisterFunction("GetStatus", null, SymbolExtensions.GetMethodInfo(() => GetStatus(null, null))); Lua.RegisterFunction("SetStatus", null, SymbolExtensions.GetMethodInfo(() => SetStatus(null, null, null))); Lua.RegisterFunction("GetRelationship", null, SymbolExtensions.GetMethodInfo(() => GetRelationship(null, null, null))); Lua.RegisterFunction("SetRelationship", null, SymbolExtensions.GetMethodInfo(() => SetRelationship(null, null, null, 0))); Lua.RegisterFunction("IncRelationship", null, SymbolExtensions.GetMethodInfo(() => IncRelationship(null, null, null, 0))); Lua.RegisterFunction("DecRelationship", null, SymbolExtensions.GetMethodInfo(() => DecRelationship(null, null, null, 0))); }
/// <summary> /// Registers the Dialogue System functions into the Lua environment. /// </summary> private static void RegisterDialogueSystemFunctions() { //# if UNITY_METRO //// Type.GetMethod() is not supported in Mono's .NET implementation. //# else //Lua.RegisterFunction("RandomElement", null, typeof(DialogueLua).GetMethod("RandomElement")); //Lua.RegisterFunction("GetLocalizedField", null, SymbolExtensions.GetMethodInfo(() => GetLocalizedField(string.Empty, string.Empty, string.Empty))); //Lua.RegisterFunction("GetLocalizedField", null, SymbolExtensions.GetMethodInfo(() => GetLocalizedField(string.Empty, string.Empty, string.Empty))); //# endif Lua.RegisterFunction("RandomElement", null, SymbolExtensions.GetMethodInfo(() => RandomElement(string.Empty))); Lua.RegisterFunction("GetLocalizedText", null, SymbolExtensions.GetMethodInfo(() => GetLocalizedText(string.Empty, string.Empty, string.Empty))); }
/// <summary> /// Registers the Chat Mapper functions into the Lua environment. /// </summary> private static void RegisterChatMapperFunctions() { //# if UNITY_METRO //// Type.GetMethod() is not supported in Mono's .NET implementation. //# else //Lua.RegisterFunction("SetStatus", null, typeof(DialogueLua).GetMethod("SetStatus")); //Lua.RegisterFunction("GetStatus", null, typeof(DialogueLua).GetMethod("GetStatus")); //Lua.RegisterFunction("SetRelationship", null, typeof(DialogueLua).GetMethod("SetRelationship")); //Lua.RegisterFunction("GetRelationship", null, typeof(DialogueLua).GetMethod("GetRelationship")); //Lua.RegisterFunction("IncRelationship", null, typeof(DialogueLua).GetMethod("IncRelationship")); //Lua.RegisterFunction("DecRelationship", null, typeof(DialogueLua).GetMethod("DecRelationship")); //# endif Lua.RegisterFunction("GetStatus", null, SymbolExtensions.GetMethodInfo(() => GetStatus(null, null))); Lua.RegisterFunction("SetStatus", null, SymbolExtensions.GetMethodInfo(() => SetStatus(null, null, null))); Lua.RegisterFunction("GetRelationship", null, SymbolExtensions.GetMethodInfo(() => GetRelationship(null, null, null))); Lua.RegisterFunction("SetRelationship", null, SymbolExtensions.GetMethodInfo(() => SetRelationship(null, null, null, 0))); Lua.RegisterFunction("IncRelationship", null, SymbolExtensions.GetMethodInfo(() => IncRelationship(null, null, null, 0))); Lua.RegisterFunction("DecRelationship", null, SymbolExtensions.GetMethodInfo(() => DecRelationship(null, null, null, 0))); }
/// <summary> /// Registers the Dialogue System functions into the Lua environment. /// </summary> private static void RegisterDialogueSystemFunctions() { Lua.RegisterFunction("RandomElement", null, SymbolExtensions.GetMethodInfo(() => RandomElement(string.Empty))); }