diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta new file mode 100644 index 00000000..a607faba --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32aa86341f1dc41fa834e5e2e82d4ee6 +folderAsset: yes +timeCreated: 1474292879 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs similarity index 88% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs index 545f4b6a..db0c03e1 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs @@ -15,38 +15,8 @@ namespace Fungus /// /// Executes an LuaScript component in the same gameobject when a condition occurs. /// - public class ExecuteHandler : MonoBehaviour, IExecuteHandlerConfigurator + public class ExecuteHandler : MonoBehaviour, IExecuteHandler, IExecuteHandlerConfigurator { - [Flags] - public enum ExecuteMethod - { - AfterPeriodOfTime = 1 << 0, - Start = 1 << 1, - Update = 1 << 2, - FixedUpdate = 1 << 3, - LateUpdate = 1 << 4, - OnDestroy = 1 << 5, - OnEnable = 1 << 6, - OnDisable = 1 << 7, - OnControllerColliderHit = 1 << 8, - OnParticleCollision = 1 << 9, - OnJointBreak = 1 << 10, - OnBecameInvisible = 1 << 11, - OnBecameVisible = 1 << 12, - OnTriggerEnter = 1 << 13, - OnTriggerExit = 1 << 14, - OnTriggerStay = 1 << 15, - OnCollisionEnter = 1 << 16, - OnCollisionExit = 1 << 17, - OnCollisionStay = 1 << 18, - OnTriggerEnter2D = 1 << 19, - OnTriggerExit2D = 1 << 20, - OnTriggerStay2D = 1 << 21, - OnCollisionEnter2D = 1 << 22, - OnCollisionExit2D = 1 << 23, - OnCollisionStay2D = 1 << 24, - } - [SerializeField] protected float executeAfterTime = 1f; public virtual float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } } diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs index 0b04044d..27ad3ba5 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs @@ -37,17 +37,17 @@ namespace Fungus var executeHandler = (ExecuteHandler)target; EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(new GUIContent("On Event")); - executeHandler.ExecuteMethods = (ExecuteHandler.ExecuteMethod)EditorGUILayout.EnumMaskField(executeHandler.ExecuteMethods, - EditorStyles.popup, - GUILayout.ExpandWidth(false)); + executeHandler.ExecuteMethods = (ExecuteMethod)EditorGUILayout.EnumMaskField(executeHandler.ExecuteMethods, + EditorStyles.popup, + GUILayout.ExpandWidth(false)); EditorGUILayout.EndHorizontal(); - if (executeHandler.IsExecuteMethodSelected(ExecuteHandler.ExecuteMethod.AfterPeriodOfTime)) + if (executeHandler.IsExecuteMethodSelected(ExecuteMethod.AfterPeriodOfTime)) { DrawOptionsForAfterPeriodOfTime(executeHandler); } - if (executeHandler.IsExecuteMethodSelected(ExecuteHandler.ExecuteMethod.Update)) + if (executeHandler.IsExecuteMethodSelected(ExecuteMethod.Update)) { DrawOptionsForOnUpdate(executeHandler); } diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs new file mode 100644 index 00000000..3af36203 --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs @@ -0,0 +1,39 @@ +using System; + +namespace Fungus +{ + [Flags] + public enum ExecuteMethod + { + AfterPeriodOfTime = 1 << 0, + Start = 1 << 1, + Update = 1 << 2, + FixedUpdate = 1 << 3, + LateUpdate = 1 << 4, + OnDestroy = 1 << 5, + OnEnable = 1 << 6, + OnDisable = 1 << 7, + OnControllerColliderHit = 1 << 8, + OnParticleCollision = 1 << 9, + OnJointBreak = 1 << 10, + OnBecameInvisible = 1 << 11, + OnBecameVisible = 1 << 12, + OnTriggerEnter = 1 << 13, + OnTriggerExit = 1 << 14, + OnTriggerStay = 1 << 15, + OnCollisionEnter = 1 << 16, + OnCollisionExit = 1 << 17, + OnCollisionStay = 1 << 18, + OnTriggerEnter2D = 1 << 19, + OnTriggerExit2D = 1 << 20, + OnTriggerStay2D = 1 << 21, + OnCollisionEnter2D = 1 << 22, + OnCollisionExit2D = 1 << 23, + OnCollisionStay2D = 1 << 24, + } + + public interface IExecuteHandler + { + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta new file mode 100644 index 00000000..5f5b1391 --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 44e1eeb74f6a64c64af0891af83e1db1 +timeCreated: 1474293118 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta new file mode 100644 index 00000000..7302e59a --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3305df777ff8d4b8ebdd1d764bb49da3 +folderAsset: yes +timeCreated: 1474292903 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs.meta