/// <summary> /// Read the data into the specified value. /// </summary> /// <param name="value">Value.</param> /// <param name="reader">Reader.</param> public override void ReadInto(object value, ISaveGameReader reader) { UnityEngine.EventSystems.StandaloneInputModule standaloneInputModule = (UnityEngine.EventSystems.StandaloneInputModule)value; foreach (string property in reader.Properties) { switch (property) { case "forceModuleActive": standaloneInputModule.forceModuleActive = reader.ReadProperty <System.Boolean> (); break; case "inputActionsPerSecond": standaloneInputModule.inputActionsPerSecond = reader.ReadProperty <System.Single> (); break; case "repeatDelay": standaloneInputModule.repeatDelay = reader.ReadProperty <System.Single> (); break; case "horizontalAxis": standaloneInputModule.horizontalAxis = reader.ReadProperty <System.String> (); break; case "verticalAxis": standaloneInputModule.verticalAxis = reader.ReadProperty <System.String> (); break; case "submitButton": standaloneInputModule.submitButton = reader.ReadProperty <System.String> (); break; case "cancelButton": standaloneInputModule.cancelButton = reader.ReadProperty <System.String> (); break; case "useGUILayout": standaloneInputModule.useGUILayout = reader.ReadProperty <System.Boolean> (); break; case "enabled": standaloneInputModule.enabled = reader.ReadProperty <System.Boolean> (); break; case "tag": standaloneInputModule.tag = reader.ReadProperty <System.String> (); break; case "name": standaloneInputModule.name = reader.ReadProperty <System.String> (); break; case "hideFlags": standaloneInputModule.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> (); break; } } }
///Init the event system if not exist. private void InitEventSystem() { UnityEngine.EventSystems.EventSystem es = GameObject.FindObjectOfType <UnityEngine.EventSystems.EventSystem>(); if (es == null) { GameObject eventsystem = new GameObject("EventSystem"); eventsystem.AddComponent <UnityEngine.EventSystems.EventSystem>(); UnityEngine.EventSystems.StandaloneInputModule sim = eventsystem.AddComponent <UnityEngine.EventSystems.StandaloneInputModule>(); sim.forceModuleActive = true; } }
static int _s_set_verticalAxis(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.EventSystems.StandaloneInputModule __cl_gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); __cl_gen_to_be_invoked.verticalAxis = LuaAPI.lua_tostring(L, 2); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(0); }
static int _g_get_verticalAxis(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.EventSystems.StandaloneInputModule gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.verticalAxis); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _s_set_inputActionsPerSecond(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.EventSystems.StandaloneInputModule __cl_gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); __cl_gen_to_be_invoked.inputActionsPerSecond = (float)LuaAPI.lua_tonumber(L, 2); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(0); }
static int _s_set_cancelButton(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.EventSystems.StandaloneInputModule gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); gen_to_be_invoked.cancelButton = LuaAPI.lua_tostring(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _g_get_cancelButton(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.EventSystems.StandaloneInputModule __cl_gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, __cl_gen_to_be_invoked.cancelButton); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
static StackObject *Process_19(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.Process(); return(__ret); }
static StackObject *get_cancelButton_12(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.cancelButton; return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
// ---------------------------------- static public UnityEngine.EventSystems.EventSystem CreateEventSystem( string name, CreationMode creationMode, string undoName = null) { int eventSysPresence = IsThereEventSystemInTheScene(); if ((eventSysPresence != 0) && (creationMode == CreationMode.OnlyIfNotPresent)) { return(null); } if ((eventSysPresence != 0) && (creationMode == CreationMode.AskIfPresent)) { if (!EditorUtility.DisplayDialog("Control Freak 2 - Create Event System", (eventSysPresence == 1) ? "There's a CF2 Event System in the scene already. Do you want to create a new one anyway?" : "There's an Event System in the scene, but it isn't using CF2 Input Module. Do you want to create a new one anyway?", "Yes", "No")) { return(null); } } UnityEngine.EventSystems.EventSystem eventSys = (UnityEngine.EventSystems.EventSystem)TouchControlWizardUtils.CreateObjectWithComponent(name, typeof(UnityEngine.EventSystems.EventSystem)); eventSys.gameObject.AddComponent(typeof(ControlFreak2.GamepadInputModule)); //eventSys.gameObject.AddComponent(typeof(ControlFreak2.MouseInputModule)); #if UNITY_PRE_5_3 eventSys.gameObject.AddComponent(typeof(UnityEngine.EventSystems.TouchInputModule)); #endif UnityEngine.EventSystems.StandaloneInputModule standaloneModule = (UnityEngine.EventSystems.StandaloneInputModule)eventSys.gameObject.AddComponent(typeof(UnityEngine.EventSystems.StandaloneInputModule)); standaloneModule.horizontalAxis = InputRig.CF_EMPTY_AXIS; standaloneModule.verticalAxis = InputRig.CF_EMPTY_AXIS; standaloneModule.submitButton = InputRig.CF_EMPTY_AXIS; standaloneModule.cancelButton = InputRig.CF_EMPTY_AXIS; if (undoName != null) { Undo.RegisterCreatedObjectUndo(eventSys.gameObject, undoName); } return(eventSys); }
/// <summary> /// Write the specified value using the writer. /// </summary> /// <param name="value">Value.</param> /// <param name="writer">Writer.</param> public override void Write(object value, ISaveGameWriter writer) { UnityEngine.EventSystems.StandaloneInputModule standaloneInputModule = (UnityEngine.EventSystems.StandaloneInputModule)value; writer.WriteProperty("forceModuleActive", standaloneInputModule.forceModuleActive); writer.WriteProperty("inputActionsPerSecond", standaloneInputModule.inputActionsPerSecond); writer.WriteProperty("repeatDelay", standaloneInputModule.repeatDelay); writer.WriteProperty("horizontalAxis", standaloneInputModule.horizontalAxis); writer.WriteProperty("verticalAxis", standaloneInputModule.verticalAxis); writer.WriteProperty("submitButton", standaloneInputModule.submitButton); writer.WriteProperty("cancelButton", standaloneInputModule.cancelButton); writer.WriteProperty("useGUILayout", standaloneInputModule.useGUILayout); writer.WriteProperty("enabled", standaloneInputModule.enabled); writer.WriteProperty("tag", standaloneInputModule.tag); writer.WriteProperty("name", standaloneInputModule.name); writer.WriteProperty("hideFlags", standaloneInputModule.hideFlags); }
static StackObject *get_repeatDelay_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.repeatDelay; __ret->ObjectType = ObjectTypes.Float; *(float *)&__ret->Value = result_of_this_method; return(__ret + 1); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.EventSystems.StandaloneInputModule o = (UnityEngine.EventSystems.StandaloneInputModule)obj; forceModuleActive = o.forceModuleActive; inputActionsPerSecond = o.inputActionsPerSecond; repeatDelay = o.repeatDelay; horizontalAxis = o.horizontalAxis; verticalAxis = o.verticalAxis; submitButton = o.submitButton; cancelButton = o.cancelButton; }
static StackObject *get_forceModuleActive_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.forceModuleActive; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return(__ret + 1); }
public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects) { obj = base.WriteTo(obj, objects); if (obj == null) { return(null); } UnityEngine.EventSystems.StandaloneInputModule o = (UnityEngine.EventSystems.StandaloneInputModule)obj; o.forceModuleActive = forceModuleActive; o.inputActionsPerSecond = inputActionsPerSecond; o.repeatDelay = repeatDelay; o.horizontalAxis = horizontalAxis; o.verticalAxis = verticalAxis; o.submitButton = submitButton; o.cancelButton = cancelButton; return(o); }
static StackObject *set_forceModuleActive_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @value = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.forceModuleActive = value; return(__ret); }
static StackObject *set_repeatDelay_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @value = *(float *)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.repeatDelay = value; return(__ret); }
static StackObject *set_horizontalAxis_7(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @value = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.EventSystems.StandaloneInputModule instance_of_this_method = (UnityEngine.EventSystems.StandaloneInputModule) typeof(UnityEngine.EventSystems.StandaloneInputModule).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.horizontalAxis = value; return(__ret); }
static int _m_UpdateModule(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.EventSystems.StandaloneInputModule __cl_gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); try { { __cl_gen_to_be_invoked.UpdateModule( ); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_IsModuleSupported(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.EventSystems.StandaloneInputModule __cl_gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); try { { bool __cl_gen_ret = __cl_gen_to_be_invoked.IsModuleSupported( ); LuaAPI.lua_pushboolean(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
void InitializeUiInputEventSystem() { if (Application.isPlaying) { GameObject root = RootObject != null ? RootObject : Setting.gameObject; if (m_eventSystem != null) { Object.Destroy(m_eventSystem); } m_eventSystem = root.AddComponent <UnityEngine.EventSystems.EventSystem>(); if (m_standaloneInputModule != null) { Object.Destroy(m_standaloneInputModule); } m_standaloneInputModule = root.AddComponent <UnityEngine.EventSystems.StandaloneInputModule>(); } }
static int _m_ShouldActivateModule(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.EventSystems.StandaloneInputModule gen_to_be_invoked = (UnityEngine.EventSystems.StandaloneInputModule)translator.FastGetCSObj(L, 1); { bool gen_ret = gen_to_be_invoked.ShouldActivateModule( ); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
/// <summary> /// Read the data using the reader. /// </summary> /// <param name="reader">Reader.</param> public override object Read(ISaveGameReader reader) { UnityEngine.EventSystems.StandaloneInputModule standaloneInputModule = SaveGameType.CreateComponent <UnityEngine.EventSystems.StandaloneInputModule> (); ReadInto(standaloneInputModule, reader); return(standaloneInputModule); }