├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── EditorBuildSettings.asset ├── NetworkManager.asset ├── TimeManager.asset ├── AudioManager.asset ├── EditorSettings.asset ├── TagManager.asset ├── DynamicsManager.asset ├── UnityConnectSettings.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset └── GraphicsSettings.asset ├── Assets ├── ToLua │ ├── Plugins │ │ ├── Debugger.dll │ │ ├── iOS │ │ │ ├── libtolua.a │ │ │ └── libtolua.a.meta │ │ ├── x86 │ │ │ ├── tolua.dll │ │ │ └── tolua.dll.meta │ │ ├── x86_64 │ │ │ ├── tolua.dll │ │ │ └── tolua.dll.meta │ │ ├── iOS.meta │ │ ├── x86.meta │ │ ├── Android.meta │ │ ├── Android │ │ │ ├── libs │ │ │ │ ├── x86 │ │ │ │ │ ├── libtolua.so │ │ │ │ │ └── libtolua.so.meta │ │ │ │ ├── x86.meta │ │ │ │ ├── armeabi-v7a.meta │ │ │ │ └── armeabi-v7a │ │ │ │ │ ├── libtolua.so │ │ │ │ │ └── libtolua.so.meta │ │ │ └── libs.meta │ │ ├── x86_64.meta │ │ ├── tolua.bundle │ │ │ ├── Contents │ │ │ │ ├── Info.plist.meta │ │ │ │ ├── MacOS │ │ │ │ │ ├── tolua.meta │ │ │ │ │ └── tolua │ │ │ │ ├── MacOS.meta │ │ │ │ └── Info.plist │ │ │ └── Contents.meta │ │ ├── Debugger.dll.meta │ │ └── tolua.bundle.meta │ ├── Lua.meta │ ├── Editor.meta │ ├── Plugins.meta │ ├── Source.meta │ ├── ToLua.meta │ ├── Editor │ │ ├── Custom.meta │ │ └── Custom │ │ │ └── CustomSettings.cs.meta │ ├── ToLua │ │ ├── Core.meta │ │ ├── Editor.meta │ │ ├── Misc.meta │ │ ├── BaseType.meta │ │ ├── Reflection.meta │ │ ├── Editor │ │ │ ├── Extend.meta │ │ │ ├── ToLuaMenu.cs.meta │ │ │ ├── ToLuaTree.cs.meta │ │ │ ├── ToLuaExport.cs.meta │ │ │ └── Extend │ │ │ │ ├── ToLua_System_Enum.cs.meta │ │ │ │ ├── ToLua_System_Type.cs.meta │ │ │ │ ├── ToLua_System_Delegate.cs.meta │ │ │ │ ├── ToLua_System_Object.cs.meta │ │ │ │ ├── ToLua_System_String.cs.meta │ │ │ │ ├── ToLua_LuaInterface_LuaField.cs.meta │ │ │ │ ├── ToLua_UnityEngine_Input.cs.meta │ │ │ │ ├── ToLua_UnityEngine_Object.cs.meta │ │ │ │ ├── ToLua_LuaInterface_EventObject.cs.meta │ │ │ │ ├── ToLua_LuaInterface_LuaMethod.cs.meta │ │ │ │ ├── ToLua_LuaInterface_LuaProperty.cs.meta │ │ │ │ ├── ToLua_UnityEngine_GameObject.cs.meta │ │ │ │ ├── ToLua_LuaInterface_LuaConstructor.cs.meta │ │ │ │ ├── ToLua_System_Object.cs │ │ │ │ ├── ToLua_UnityEngine_Input.cs │ │ │ │ ├── ToLua_System_String.cs │ │ │ │ ├── ToLua_LuaInterface_LuaField.cs │ │ │ │ ├── ToLua_LuaInterface_LuaMethod.cs │ │ │ │ ├── ToLua_LuaInterface_LuaProperty.cs │ │ │ │ ├── ToLua_LuaInterface_LuaConstructor.cs │ │ │ │ ├── ToLua_LuaInterface_EventObject.cs │ │ │ │ ├── ToLua_System_Type.cs │ │ │ │ └── ToLua_System_Enum.cs │ │ ├── Lua │ │ │ ├── System │ │ │ │ ├── Reflection.meta │ │ │ │ ├── Timer.lua.meta │ │ │ │ ├── ValueType.lua.meta │ │ │ │ ├── coroutine.lua.meta │ │ │ │ ├── Reflection │ │ │ │ │ ├── BindingFlags.lua.meta │ │ │ │ │ └── BindingFlags.lua │ │ │ │ └── ValueType.lua │ │ │ ├── System.meta │ │ │ ├── cjson.meta │ │ │ ├── lpeg.meta │ │ │ ├── misc.meta │ │ │ ├── socket.meta │ │ │ ├── UnityEngine.meta │ │ │ ├── protobuf.meta │ │ │ ├── event.lua.meta │ │ │ ├── list.lua.meta │ │ │ ├── ltn12.lua.meta │ │ │ ├── mime.lua.meta │ │ │ ├── slot.lua.meta │ │ │ ├── socket.lua.meta │ │ │ ├── tolua.lua.meta │ │ │ ├── typeof.lua.meta │ │ │ ├── lpeg │ │ │ │ └── re.lua.meta │ │ │ ├── misc │ │ │ │ ├── strict.lua.meta │ │ │ │ ├── utf8.lua.meta │ │ │ │ ├── functions.lua.meta │ │ │ │ ├── strict.lua │ │ │ │ └── functions.lua │ │ │ ├── socket │ │ │ │ ├── ftp.lua.meta │ │ │ │ ├── http.lua.meta │ │ │ │ ├── mbox.lua.meta │ │ │ │ ├── smtp.lua.meta │ │ │ │ ├── tp.lua.meta │ │ │ │ ├── headers.lua.meta │ │ │ │ ├── url.lua.meta │ │ │ │ └── mbox.lua │ │ │ ├── UnityEngine │ │ │ │ ├── Ray.lua.meta │ │ │ │ ├── Time.lua.meta │ │ │ │ ├── Bounds.lua.meta │ │ │ │ ├── Color.lua.meta │ │ │ │ ├── LayerMask.lua.meta │ │ │ │ ├── Mathf.lua.meta │ │ │ │ ├── Plane.lua.meta │ │ │ │ ├── Touch.lua.meta │ │ │ │ ├── Vector2.lua.meta │ │ │ │ ├── Vector4.lua.meta │ │ │ │ ├── Quaternion.lua.meta │ │ │ │ ├── RaycastHit.lua.meta │ │ │ │ ├── Vector3.lua.meta │ │ │ │ ├── LayerMask.lua │ │ │ │ ├── Ray.lua │ │ │ │ ├── Plane.lua │ │ │ │ ├── RaycastHit.lua │ │ │ │ └── Touch.lua │ │ │ ├── protobuf │ │ │ │ ├── decoder.lua.meta │ │ │ │ ├── encoder.lua.meta │ │ │ │ ├── containers.lua.meta │ │ │ │ ├── descriptor.lua.meta │ │ │ │ ├── listener.lua.meta │ │ │ │ ├── protobuf.lua.meta │ │ │ │ ├── text_format.lua.meta │ │ │ │ ├── wire_format.lua.meta │ │ │ │ ├── type_checkers.lua.meta │ │ │ │ ├── listener.lua │ │ │ │ ├── descriptor.lua │ │ │ │ ├── containers.lua │ │ │ │ ├── type_checkers.lua │ │ │ │ └── text_format.lua │ │ │ ├── cjson │ │ │ │ └── util.lua.meta │ │ │ ├── slot.lua │ │ │ ├── typeof.lua │ │ │ ├── tolua.lua │ │ │ └── mime.lua │ │ ├── Lua.meta │ │ ├── readme.txt.meta │ │ ├── Core │ │ │ ├── LuaDLL.cs.meta │ │ │ ├── ToLua.cs.meta │ │ │ ├── LuaBaseRef.cs.meta │ │ │ ├── LuaEvent.cs.meta │ │ │ ├── LuaFunction.cs.meta │ │ │ ├── LuaMisc.cs.meta │ │ │ ├── LuaState.cs.meta │ │ │ ├── LuaStatePtr.cs.meta │ │ │ ├── LuaStatic.cs.meta │ │ │ ├── LuaTable.cs.meta │ │ │ ├── LuaThread.cs.meta │ │ │ ├── ObjectPool.cs.meta │ │ │ ├── TypeChecker.cs.meta │ │ │ ├── LuaAttributes.cs.meta │ │ │ ├── LuaBeatEvent.cs.meta │ │ │ ├── LuaException.cs.meta │ │ │ ├── LuaFileUtils.cs.meta │ │ │ ├── LuaMethodCache.cs.meta │ │ │ ├── LuaUnityLibs.cs.meta │ │ │ ├── ObjectTranslator.cs.meta │ │ │ └── LuaAttributes.cs │ │ ├── Misc │ │ │ ├── LuaClient.cs.meta │ │ │ ├── LuaLooper.cs.meta │ │ │ ├── LuaCoroutine.cs.meta │ │ │ └── LuaResLoader.cs.meta │ │ ├── Reflection │ │ │ ├── LuaField.cs.meta │ │ │ ├── LuaMethod.cs.meta │ │ │ ├── LuaConstructor.cs.meta │ │ │ ├── LuaProperty.cs.meta │ │ │ ├── LuaReflection.cs.meta │ │ │ └── LuaConstructor.cs │ │ └── BaseType │ │ │ ├── System_ArrayWrap.cs.meta │ │ │ ├── System_EnumWrap.cs.meta │ │ │ ├── System_ObjectWrap.cs.meta │ │ │ ├── System_StringWrap.cs.meta │ │ │ ├── System_TypeWrap.cs.meta │ │ │ ├── System_DelegateWrap.cs.meta │ │ │ ├── System_NullObjectWrap.cs.meta │ │ │ ├── UnityEngine_ObjectWrap.cs.meta │ │ │ ├── LuaInterface_LuaFieldWrap.cs.meta │ │ │ ├── LuaInterface_LuaMethodWrap.cs.meta │ │ │ ├── LuaInterface_LuaOutWrap.cs.meta │ │ │ ├── LuaInterface_EventObjectWrap.cs.meta │ │ │ ├── LuaInterface_LuaConstructorWrap.cs.meta │ │ │ ├── LuaInterface_LuaPropertyWrap.cs.meta │ │ │ ├── System_Collections_Generic_ListWrap.cs.meta │ │ │ ├── System_Collections_IEnumeratorWrap.cs.meta │ │ │ ├── System_Collections_Generic_DictionaryWrap.cs.meta │ │ │ ├── System_Collections_Generic_KeyValuePairWrap.cs.meta │ │ │ ├── System_Collections_Generic_Dictionary_KeyCollectionWrap.cs.meta │ │ │ ├── System_Collections_Generic_Dictionary_ValueCollectionWrap.cs.meta │ │ │ ├── System_Collections_ObjectModel_ReadOnlyCollectionWrap.cs.meta │ │ │ ├── System_NullObjectWrap.cs │ │ │ ├── UnityEngine_CoroutineWrap.cs │ │ │ ├── UnityEngine_CoroutineWrap.cs.meta │ │ │ ├── LuaInterface_LuaOutWrap.cs │ │ │ ├── LuaInterface_LuaFieldWrap.cs │ │ │ ├── LuaInterface_LuaPropertyWrap.cs │ │ │ ├── System_Collections_Generic_KeyValuePairWrap.cs │ │ │ ├── LuaInterface_LuaMethodWrap.cs │ │ │ ├── LuaInterface_LuaConstructorWrap.cs │ │ │ ├── System_Collections_IEnumeratorWrap.cs │ │ │ └── LuaInterface_EventObjectWrap.cs │ ├── Source │ │ ├── Generate.meta │ │ ├── LuaConst.cs.meta │ │ ├── Generate │ │ │ ├── LuaBinder.cs.meta │ │ │ ├── DelegateFactory.cs.meta │ │ │ ├── UnityEngine_CameraWrap.cs.meta │ │ │ ├── UnityEngine_InputWrap.cs.meta │ │ │ ├── UnityEngine_KeyCodeWrap.cs.meta │ │ │ ├── UnityEngine_LightWrap.cs.meta │ │ │ ├── UnityEngine_PhysicsWrap.cs.meta │ │ │ ├── UnityEngine_ScreenWrap.cs.meta │ │ │ ├── UnityEngine_ShaderWrap.cs.meta │ │ │ ├── UnityEngine_SpaceWrap.cs.meta │ │ │ ├── UnityEngine_TextureWrap.cs.meta │ │ │ ├── UnityEngine_TimeWrap.cs.meta │ │ │ ├── UnityEngine_WWWWrap.cs.meta │ │ │ ├── LuaInterface_DebuggerWrap.cs.meta │ │ │ ├── UnityEngine_AnimationWrap.cs.meta │ │ │ ├── UnityEngine_AnimatorWrap.cs.meta │ │ │ ├── UnityEngine_ApplicationWrap.cs.meta │ │ │ ├── UnityEngine_AssetBundleWrap.cs.meta │ │ │ ├── UnityEngine_AudioClipWrap.cs.meta │ │ │ ├── UnityEngine_AudioSourceWrap.cs.meta │ │ │ ├── UnityEngine_BehaviourWrap.cs.meta │ │ │ ├── UnityEngine_BlendWeightsWrap.cs.meta │ │ │ ├── UnityEngine_BoxColliderWrap.cs.meta │ │ │ ├── UnityEngine_ColliderWrap.cs.meta │ │ │ ├── UnityEngine_ComponentWrap.cs.meta │ │ │ ├── UnityEngine_GameObjectWrap.cs.meta │ │ │ ├── UnityEngine_LightTypeWrap.cs.meta │ │ │ ├── UnityEngine_MaterialWrap.cs.meta │ │ │ ├── UnityEngine_MeshColliderWrap.cs.meta │ │ │ ├── UnityEngine_MeshRendererWrap.cs.meta │ │ │ ├── UnityEngine_PlayModeWrap.cs.meta │ │ │ ├── UnityEngine_QueueModeWrap.cs.meta │ │ │ ├── UnityEngine_RendererWrap.cs.meta │ │ │ ├── UnityEngine_ResourcesWrap.cs.meta │ │ │ ├── UnityEngine_RigidbodyWrap.cs.meta │ │ │ ├── UnityEngine_SleepTimeoutWrap.cs.meta │ │ │ ├── UnityEngine_Texture2DWrap.cs.meta │ │ │ ├── UnityEngine_TransformWrap.cs.meta │ │ │ ├── UnityEngine_WrapModeWrap.cs.meta │ │ │ ├── UnityEngine_AnimationClipWrap.cs.meta │ │ │ ├── UnityEngine_AnimationStateWrap.cs.meta │ │ │ ├── UnityEngine_AsyncOperationWrap.cs.meta │ │ │ ├── UnityEngine_CameraClearFlagsWrap.cs.meta │ │ │ ├── UnityEngine_CapsuleColliderWrap.cs.meta │ │ │ ├── UnityEngine_MonoBehaviourWrap.cs.meta │ │ │ ├── UnityEngine_ParticleSystemWrap.cs.meta │ │ │ ├── UnityEngine_QualitySettingsWrap.cs.meta │ │ │ ├── UnityEngine_RenderSettingsWrap.cs.meta │ │ │ ├── UnityEngine_RenderTextureWrap.cs.meta │ │ │ ├── UnityEngine_SphereColliderWrap.cs.meta │ │ │ ├── UnityEngine_TrackedReferenceWrap.cs.meta │ │ │ ├── UnityEngine_AnimationBlendModeWrap.cs.meta │ │ │ ├── UnityEngine_CharacterControllerWrap.cs.meta │ │ │ ├── UnityEngine_SkinnedMeshRendererWrap.cs.meta │ │ │ ├── UnityEngine_Experimental_Director_DirectorPlayerWrap.cs.meta │ │ │ ├── UnityEngine_SleepTimeoutWrap.cs │ │ │ ├── UnityEngine_SpaceWrap.cs │ │ │ ├── UnityEngine_PlayModeWrap.cs │ │ │ ├── UnityEngine_QueueModeWrap.cs │ │ │ ├── UnityEngine_AnimationBlendModeWrap.cs │ │ │ ├── UnityEngine_BlendWeightsWrap.cs │ │ │ ├── UnityEngine_LightTypeWrap.cs │ │ │ ├── UnityEngine_CameraClearFlagsWrap.cs │ │ │ ├── UnityEngine_WrapModeWrap.cs │ │ │ ├── UnityEngine_TrackedReferenceWrap.cs │ │ │ └── UnityEngine_MeshRendererWrap.cs │ │ └── LuaConst.cs │ └── Lua │ │ ├── Main.lua.meta │ │ └── Main.lua ├── LuaScripts │ ├── test.lua │ └── test.lua.meta ├── Scripts │ ├── Editor │ │ ├── EditorConst.cs │ │ ├── EditorConst.cs.meta │ │ ├── AssetBundleBuillder.cs.meta │ │ ├── AssetLabelEnsurer.cs.meta │ │ ├── AssetLabelEnsurer.cs │ │ └── AssetBundleBuillder.cs │ ├── Editor.meta │ ├── ProcedureLaunch.cs.meta │ ├── ProcedureExecLuaScripts.cs.meta │ ├── ProcedureLoadLuaScripts.cs.meta │ ├── ProcedureExecLuaScripts.cs │ └── ProcedureLaunch.cs ├── Launch.unity.meta ├── Scripts.meta ├── StreamingAssets.meta ├── ToLua.meta ├── GameFrameworkConfigs │ ├── AssetBundleEditor.xml.meta │ ├── BuildSettings.xml.meta │ ├── AssetBundleCollection.xml.meta │ ├── BuildSettings.xml │ └── AssetBundleEditor.xml ├── LuaScripts.meta ├── UnityGameFramework.meta ├── GameFrameworkConfigs.meta ├── GameFrameworkExtensions.meta └── GameFrameworkExtensions │ ├── Lua.meta │ └── Lua │ ├── Scripts.meta │ └── Scripts │ ├── LuaComponent.cs.meta │ ├── CustomLuaLoader.cs.meta │ └── CustomLuaLoader.cs ├── .gitmodules ├── .gitignore ├── LICENSE └── README.md /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.0f3 2 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Debugger.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/Debugger.dll -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/iOS/libtolua.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/iOS/libtolua.a -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/x86/tolua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/x86/tolua.dll -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/x86_64/tolua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/x86_64/tolua.dll -------------------------------------------------------------------------------- /Assets/ToLua/Lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 379b0ef2d43e1bd4fa5da0ccdf1f8bbd 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Assets/UnityGameFramework"] 2 | path = Assets/UnityGameFramework 3 | url = http://github.com/EllanJiang/UnityGameFramework 4 | -------------------------------------------------------------------------------- /Assets/ToLua/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 772338ec68e701847a565d981a690787 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e34dc6e361156f0439e74fa578a45650 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Source.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51d939fde26e0e14891f186ff8635b87 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 032822da3092a2543aabbd58c5697222 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Editor/Custom.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 327fa85d300c38c48836bfee53f47cb0 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3f3ab55ec6f8fe4a8ad1581c66be646 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b0b0c4ffe67d2f4292c5211de91e55f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7714c4ebcd6e6474da6ec5df53bca350 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d9fa950d6c449e42893b939877b4ec7 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ec2002202db97649bcdffe1705c0bdc 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 729c01aec7bba814d88608249c8a170b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs/x86/libtolua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/Android/libs/x86/libtolua.so -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/x86_64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ea0a8e1f899b1148badb9e92b431566 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0a78131d3329a6429aef18c841165dc 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 337508ffab1cff64bbf7476789c95d59 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcd2662a23826114e86e7828b55342b7 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/LuaScripts/test.lua: -------------------------------------------------------------------------------- 1 | local sum = 0 2 | 3 | for i = 1, 100 do 4 | sum = sum + i 5 | end 6 | 7 | print(string.format('Test script works with %d.', sum)) 8 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72b436146481b3f40b05eb161ca7f39c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle/Contents/Info.plist.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c55f8f810aeca6a489b7adbbf8e88e3f 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle/Contents/MacOS/tolua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b06862c3e0b61e418fab22ed824bdaa 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdd2718c24fc3014d96c208f87886fe3 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d76e3311efeac224996b0cb7a06a7a3a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle/Contents/MacOS/tolua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/tolua.bundle/Contents/MacOS/tolua -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/Reflection.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b31921aad5a29bf48b69fbad423de1be 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs/armeabi-v7a.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 034154e518117d842b99fd1f19efa3a3 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs/armeabi-v7a/libtolua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarfieldJiang/UGFWithToLua/HEAD/Assets/ToLua/Plugins/Android/libs/armeabi-v7a/libtolua.so -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle/Contents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99bcfe9e111134543a9bc02b3e14f558 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle/Contents/MacOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b8ced19ad551a84fac7aa31b326bc04 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/EditorConst.cs: -------------------------------------------------------------------------------- 1 | namespace Game.Editor 2 | { 3 | public static class EditorConst 4 | { 5 | public const string LuaScriptAssetLabel = "LuaScript"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b3be0814bb45e640973aea4f6303a33 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /Assets/Launch.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d2d51bf0fc3dfc42908e3a7a64f4feb 3 | timeCreated: 1433496475 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c23205cbb914d9943ba97091e50d9d34 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/cjson.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51fabff50886aea4ca5100ee3396939b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/lpeg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58143f62c40fa4143903b5b1abc707fe 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08e54c61aaaa7c545b03c37c12e41df1 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d809aad390df7d54a95d719367731993 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/Lua/Main.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 091b02c3490daac4f8ed8cd5b62090b1 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec9654611f40bd64cb988c5f45494721 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 588f81265fa730e41a5371957a46eb61 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ToLua/Lua/Main.lua: -------------------------------------------------------------------------------- 1 | --主入口函数。从这里开始lua逻辑 2 | function Main() 3 | 4 | end 5 | 6 | --场景切换通知 7 | function OnLevelWasLoaded(level) 8 | collectgarbage("collect") 9 | Time.timeSinceLevelLoad = 0 10 | end -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/event.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cb3ad8be0f474f4c997acf1b791b133 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/list.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0d0ca55b7df3414aafaf11a39c13378 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/ltn12.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f6ae256ba8bd244692e687b1b0ece95 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/mime.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78de065ed4e50984eba196a41070d017 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/slot.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5040eeedfb5e1bf4b8a5294bba19ca0b 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63c3bb6af007b6344af9a86ef0b7e225 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/tolua.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dab8762e884a1c469dd11f6d2044a0f 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/typeof.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7edd4f2975d3f54f8396b61d8b34944 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 859da2c06086d3145814f5571c3d465a 3 | folderAsset: yes 4 | timeCreated: 1433511473 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/lpeg/re.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7e8b1ba4c06a4d4db879ad831cb62f1 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/misc/strict.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4df6e3671aafc8e4d82fee6a2cf5948e 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/misc/utf8.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7ac60fc5e653564588e60deb91863ee 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/ftp.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d703a862f37cfb42a2937b6f2cc9df6 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/http.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 209e83764932d974287e82cda5febaf7 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/mbox.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b179323d673f3f04996fc0b22c0817bb 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/smtp.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fb16f8ece254ef4d9c196242b49a8ae 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/tp.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f81b525c8aa6ab6408db2989c91556cc 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/StreamingAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa53b8776f6a8ce4598fe035cb4356b8 3 | folderAsset: yes 4 | timeCreated: 1433497581 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/Timer.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e891968e6d367cf4da81d8c24a52c358 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/ValueType.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fab9e4d6fcf702740a4c66965903ed1f 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/coroutine.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69692ffc56243fb4a8d655a208364fec 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Ray.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 436d981c3546acd44a03048767c0d85a 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Time.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f2e1d9dee4ecaf4b8734c59f1c9f3b5 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/misc/functions.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ad071edc48d0d8469028957a2df9c67 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/decoder.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99e0d332d92e1c44ca56267a2b3bdcf9 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/encoder.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59c27d5459f0dfc4ab1077ce6f391ea9 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/headers.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62876db61c32bf6499db08ea59ccff1f 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c85b2c9de573bc54881ca0c2427016cd 3 | labels: 4 | - AssetBundleExclusive 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Bounds.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8643f0e46fe222e48919766d7b0c7c5f 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Color.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54770d2645593c347ac25713a6d332e3 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/LayerMask.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08700fd491ce4cf4ba55fd9832b9f9cf 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Mathf.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cfbc4fb807d4e444bd41df7de6c249e 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Plane.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3971497c90061f4d9c0e9a99b5bbcbe 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Touch.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48ee0c1b8478eba4f9338e5ec4a14d40 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Vector2.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebac0a3bf4e463249a78081c5cc3abcf 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Vector4.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e294d4af7e55084dadac8ee7a76099d 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/containers.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b091e6d28e2ea5b469fa0ef87c372f3a 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/descriptor.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec5270fc0e79e1140be77c303c4874c4 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/listener.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7778f4f6aeddbee43984c5da8cc06953 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/protobuf.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afc64cedbe4a843499e187d95d272f06 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/text_format.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11ebbcbb210e532448bcc1440a557d8f 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/wire_format.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02ba9c90e50e89e4da2ee869851300a0 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Quaternion.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc8181e6244125146a87c5b83c380a92 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/RaycastHit.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 707a4e1a225007d45923200abf2c9c13 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/type_checkers.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38d553dac9a25c84c9c7d74608783a1b 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/LuaConst.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35b0c8bef181f2d4dacd3c860eb546a7 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaDLL.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d60cef534e986e849a829838fbeb74b5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/ToLua.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8558028e53ff5d946b0ef857634815da 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/Reflection/BindingFlags.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 447334b96205b8040b534702d8d806c6 3 | labels: 4 | - LuaScript 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaBaseRef.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39292548101f65b41be91c5d20f20812 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce5b2d0ac4f71564c84ecc85556409a4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f2e7f7664506cc45b1e1d375c066432 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaMisc.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49b0c76b911a9d34bac07d4b3aa7f6de 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 358b86bdf79858e46b17d8700238c397 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaStatePtr.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e68c435592e3d3b47a315497b6150aae 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaStatic.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7f8fdc4e97256748b422edf401c641d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaTable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b68fd1e3004ea4a4a879bf6fbda73510 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaThread.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c80e713269311db4689148e01949206a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/ObjectPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 375ac727a60642f4e9db9303e4025911 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/TypeChecker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2c5d493c1805784994fefe7b22da126 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/ToLuaMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97fb7996cd1338442af03841f30cddaf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/ToLuaTree.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99b4e579c20c91f4d84ce5aa9add4672 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Misc/LuaClient.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d41d4486c02e3e4ca1c1f12f7a48a95 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Misc/LuaLooper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d56dbfed903b80e498bb872845c17e7e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: -10 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d599c64e3f4b74a479f3de9ab2d4b4d2 3 | folderAsset: yes 4 | timeCreated: 1489397950 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/LuaBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9621a0179b692cd46b020b1de545ebed 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaAttributes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 036fab5eb22f19e4bba933e194fb4756 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaBeatEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7332596f22ac5446852c531d7148318 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaException.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b37c8a2d4e86364c85c26a407d79af7 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaFileUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc1dfae6a246cdf418b607701b2dfc7c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaMethodCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d0c295670bdae343be5791ad4a0e9ae 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaUnityLibs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f293d0bd6470a044a8688cd9a61b433 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/ObjectTranslator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 607902915586ecd43b863b154c1337ad 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/ToLuaExport.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73e814f0ef0ab914181c1f1e0a989935 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Misc/LuaCoroutine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61c0f3aff91dfbd4097181bfb8c99d7f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Misc/LuaResLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61b6ccc77a2cfc341963b08eb6cb4dfc 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection/LuaField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac0dd1f9fec2afa4e96fc2f583688c5a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection/LuaMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e50f0b4cc54866649975adb5d9801a3d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/GameFrameworkConfigs/AssetBundleEditor.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c93801e1577b65d45b3f79ec237c2a4e 3 | timeCreated: 1471580830 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/GameFrameworkConfigs/BuildSettings.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79e65cd785b714f4f80e9a0a69af438e 3 | timeCreated: 1469693999 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/LuaScripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f513e4d8ffff3e43870bf4de465083b 3 | folderAsset: yes 4 | timeCreated: 1489403378 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cf510507d557a743ac2872f945ffdde 3 | folderAsset: yes 4 | timeCreated: 1489416319 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ToLua/Editor/Custom/CustomSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d68e81cfa02de7e44a2ff558bdc3ac89 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/DelegateFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b601554b6e73074a99764aab89026c9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_ArrayWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 270e5e13dbb276c47a14c00ec09f9254 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_EnumWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fd9d683a50920540914bdd15aa75290 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_ObjectWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcf1094389eec494d9d80c46f54f2a7e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_StringWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6380cf60ae81034418e4fe4dabc06bc2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_TypeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a713f1fe057cf7248b09e045a105933b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection/LuaConstructor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f277531b56c0944fb5d9af67defed02 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection/LuaProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26952c90fb22bda4dbe945f2fa2224ff 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection/LuaReflection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3faee4f867484814bb3f76d4a798219d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/GameFrameworkConfigs/AssetBundleCollection.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e829c7677c2cd2942b69b389ffbccb4e 3 | timeCreated: 1489995830 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_DelegateWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86ed9798a2c5dc74e9018394dfc827ea 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_NullObjectWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdcd3994912f4e145b1f12f3d76376b6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/UnityEngine_ObjectWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66f068299d0233f409ae0011b24ae1ba 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Enum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff4fa54c22d6f7c428ef9aa02f6c10d4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Type.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a67e5f490d5d4cd4f8754c921a414d9a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/UnityGameFramework.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b0bebd831f06e34eaff21de359647bb 3 | folderAsset: yes 4 | timeCreated: 1500183808 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/GameFrameworkConfigs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68187937b4e820445a3d51bbb71ecf37 3 | folderAsset: yes 4 | timeCreated: 1500185945 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/GameFrameworkExtensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a21c8f9f776b1f4449180755c1dac1c3 3 | folderAsset: yes 4 | timeCreated: 1489398109 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaFieldWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58e0ce586689f58419f26062891e1fc1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaMethodWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd62b7af99a9c284cb3b8c9c8a177e8c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaOutWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ba873a052f57bc45890275ec67bb4dc 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Delegate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f0591686bc09e74e9a4fe2ad4e9fdb2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Object.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afb4e6913f506df4c9eb98f70781a578 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_String.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cc775dacb56ec34587e28d9e3f68417 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/GameFrameworkExtensions/Lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7605d6440f7e38b47a51dbdb607292d2 3 | folderAsset: yes 4 | timeCreated: 1489398116 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/LuaScripts/test.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d399cec389f78c4791632413c86efb8 3 | labels: 4 | - LuaScript 5 | timeCreated: 1489405057 6 | licenseType: Pro 7 | DefaultImporter: 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_EventObjectWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9eec90316b4c2da499dee7c75f1f94ae 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaConstructorWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be39bc8579dccd14bb20b24e64a68faf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaPropertyWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b401947a631ece4487e44f4b8ef9418 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6b190ca703de424fafa500033a782a3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_UnityEngine_Input.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cee476932ca9a04da9cff77f92e1894 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_UnityEngine_Object.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed2a77b78fd7258438b2b5a9e881d7c2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_Generic_ListWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9806172156647e244b2fb905a4d02611 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_IEnumeratorWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7eaa472c4f36f9d419d9bf704795f0d6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_EventObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a98ce054e1b9e848a9ed23974b72436 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6eac87eec04d6e547ac028d69e0eeb71 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e00a567610c97754bbae9672db75a1f2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_UnityEngine_GameObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ed77ac31b521ad4bae3fe7e8b84cab4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/GameFrameworkExtensions/Lua/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b6b11f560d339e43adedbe1a5144bb5 3 | folderAsset: yes 4 | timeCreated: 1489398367 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_Generic_DictionaryWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 973a63c864c67f34b852be1021aa8445 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaConstructor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24ae6f8094d27814db58bed92723e5eb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_Generic_KeyValuePairWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bfe26e81faf9a1498eaae521869ecea 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/cjson/util.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6b21c50e0c10c840bb4965a6b03fdc1 3 | labels: 4 | - LuaScript 5 | timeCreated: 1489422773 6 | licenseType: Pro 7 | TextScriptImporter: 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/url.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f52d8d21085d51c42b5e27aca557bcd9 3 | labels: 4 | - LuaScript 5 | timeCreated: 1489422773 6 | licenseType: Pro 7 | TextScriptImporter: 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_Generic_Dictionary_KeyCollectionWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5a969e41ba260d4197ec05de2e0b107 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_Generic_Dictionary_ValueCollectionWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b073f28ab535d6478ab1e2f76f44547 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_ObjectModel_ReadOnlyCollectionWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa5b181e2942520408fb4d6bac615d4f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Vector3.lua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3697c841f98720444b380cc2756c17ea 3 | labels: 4 | - LuaScript 5 | timeCreated: 1489422773 6 | licenseType: Pro 7 | TextScriptImporter: 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_NullObjectWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class System_NullObjectWrap 5 | { 6 | public static void Register(LuaState L) 7 | { 8 | L.BeginClass(typeof(NullObject), null, "null"); 9 | L.EndClass(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcedureLaunch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6c3d65d0c3a2104383e82700116b3d1 3 | timeCreated: 1433498533 4 | MonoImporter: 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcedureExecLuaScripts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d58c0ce5e2c6ea74393407d21c5eeb53 3 | timeCreated: 1433498533 4 | MonoImporter: 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcedureLoadLuaScripts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d84d5e1be5c392b4889f2b50d05c5759 3 | timeCreated: 1433498533 4 | MonoImporter: 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/EditorConst.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3338cc96f50f2db478440f596e10b125 3 | timeCreated: 1489418425 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/AssetBundleBuillder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23b757f679f2ab64fa30b52fad4e5da3 3 | timeCreated: 1489416334 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/AssetLabelEnsurer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2257826f4162fe4ca2e273368ea17e7 3 | timeCreated: 1489416334 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_CameraWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d6f3c6504eba324ca66bf74351c1cf8 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_InputWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f55d1f5f0db1c314d89f42545cd1b73d 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_KeyCodeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5d56a033c196ab49b933cc8abc29e6e 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_LightWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 868d6d5bcaa693a41ba3f85528e7747d 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_PhysicsWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d25d8fae6e9ce948be6ff479804df67 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ScreenWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c7ee87c54ced414b8707a8681571cc9 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ShaderWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d411a27093e13db4f9094b8672870e65 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_SpaceWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd96e918deeb72a4ab87560489c6d1c8 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_TextureWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb15012e20a20cd44a91bd5e0b65856b 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_TimeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06a2332143ab1ba478df246e47d4d78c 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_WWWWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 055e07894463ae545897eb80b619dfca 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/GameFrameworkExtensions/Lua/Scripts/LuaComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1835d70b3148cc44c9103165b5532287 3 | timeCreated: 1489398151 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/LuaInterface_DebuggerWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0543e649619fc1743baaf2568c819fe3 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AnimationWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 330b09a7d3a086e4da1ca093fd57d7fd 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AnimatorWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd6646aa733377d43affbaf82cf83ff2 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ApplicationWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69477d90d6a04f9439d1f0e8b731910d 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AssetBundleWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05fe0d9c08abb854aad2c095dd14d952 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AudioClipWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0abd06fba251e04d829f304aecd6a1e 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AudioSourceWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0504087fd8eb03d4a8475a7e04dc9405 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_BehaviourWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c32f2274a32c9894ea938b6414bdedf2 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_BlendWeightsWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 631248e373e0c2243b9c45984e546f92 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_BoxColliderWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e31d6f7c2cdaa6e4d98f2331f0732010 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ColliderWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65c4b4295788c824c989e86343771d77 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ComponentWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fa3eb8fcb98046409ea4df49f5efe37 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_GameObjectWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa1349b0e3131314396a9efb3e1aee6a 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_LightTypeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cb11de8bef5cc14587f0ea2f3a7806d 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_MaterialWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75518663adca4c64eb3ff238c722460a 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_MeshColliderWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac1c955d0f2437049a48858b0f9a61b2 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_MeshRendererWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d532eb1af8f2c640af9e55efb3c657a 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_PlayModeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c4104e38ca75ad43a958ec6ed22d893 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_QueueModeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bfb46816208c5e4185f51977a00d538 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_RendererWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96a169e020eff4a44b4b90fdb7fbe2bd 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ResourcesWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd3227e5d4d8a7149a541e012e6fdd7b 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_RigidbodyWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f5413c857a2ba143879cc84a4733228 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_SleepTimeoutWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1a881026b096b24385241c31d33266e 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_Texture2DWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0caeb9541eee2d44aad37ad43618b43e 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_TransformWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f3fa8de52bb894418a1ba551ac1259e 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_WrapModeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdc2713bcace26248ac30a61fa63c365 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/UnityEngine_CoroutineWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class UnityEngine_CoroutineWrap 5 | { 6 | public static void Register(LuaState L) 7 | { 8 | L.BeginClass(typeof(UnityEngine.Coroutine), null); 9 | L.RegFunction("__tostring", ToLua.op_ToString); 10 | L.EndClass(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/UnityEngine_CoroutineWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0142bbe402aab764582bb960d6966d34 3 | timeCreated: 1471422858 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/GameFrameworkExtensions/Lua/Scripts/CustomLuaLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11c94ac1f85ef0547a3a5378b95235b9 3 | timeCreated: 1489398151 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AnimationClipWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccf3748805c61ed4187c47bc2d151e93 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AnimationStateWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e93e1290d591ad4799dfc9cfe7faad5 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AsyncOperationWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e423964d00ba2e4794ef130e1ab9125 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_CameraClearFlagsWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19fdf10705b5cf146b8ecdce9a52fc64 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_CapsuleColliderWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2374a6ef766a1a34282343cf8a3ab8d9 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_MonoBehaviourWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be9e8cdabaad0204780b243efcd99478 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_ParticleSystemWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 170cc3fa0a607a54cbabd754a37c43ab 3 | timeCreated: 1489398851 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_QualitySettingsWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db3b50314ee97034bb46740b7c72c5ee 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_RenderSettingsWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b71a3f3c478ce62439bc984769c1b1a6 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_RenderTextureWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc27357b603a1424aa7f11fda191e014 3 | timeCreated: 1489398853 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_SphereColliderWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da0944fc5b8c42941a3ddfa82d9b1c28 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_TrackedReferenceWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 310a36b7e83b5cd479e297c69f0ef129 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/GameFrameworkConfigs/BuildSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AnimationBlendModeWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8133d68ac30b1f44f81dbdc400173224 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_CharacterControllerWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1a1bb03396b2e94ab7244542dbb4798 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_SkinnedMeshRendererWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9d44c3370ece6e49bb8631fef6d9db3 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_Experimental_Director_DirectorPlayerWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fd701b967b246340ba965663a7b2631 3 | timeCreated: 1489398852 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | m_VirtualizeEffects: 1 17 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_SleepTimeoutWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_SleepTimeoutWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginStaticLibs("SleepTimeout"); 10 | L.RegConstant("NeverSleep", -1); 11 | L.RegConstant("SystemSetting", -2); 12 | L.EndStaticLibs(); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Object.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_System_Object 5 | { 6 | public static string DestroyDefined = "\t\treturn ToLua.Destroy(L);"; 7 | 8 | [UseDefinedAttribute] 9 | public static void Destroy(object obj) 10 | { 11 | } 12 | 13 | public static bool op_Equality(Object x, Object y) 14 | { 15 | return false; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 2 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Debugger.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c33668af923d0aa4ebd48ebe80ef943a 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | isOverridable: 0 9 | platformData: 10 | Any: 11 | enabled: 1 12 | settings: {} 13 | Editor: 14 | enabled: 0 15 | settings: 16 | DefaultValueInitialized: true 17 | WindowsStoreApps: 18 | enabled: 0 19 | settings: 20 | CPU: AnyCPU 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcedureExecLuaScripts.cs: -------------------------------------------------------------------------------- 1 | using GameFramework.Fsm; 2 | using GameFramework.Procedure; 3 | using ProcedureOwner = GameFramework.Fsm.IFsm; 4 | using UnityGameFramework.Runtime; 5 | using UnityGameFramework.Runtime.Lua; 6 | 7 | namespace Game 8 | { 9 | public class ProcedureExecLuaScripts : ProcedureBase 10 | { 11 | protected override void OnEnter(ProcedureOwner procedureOwner) 12 | { 13 | base.OnEnter(procedureOwner); 14 | var luaComp = GameEntry.GetComponent(); 15 | luaComp.StartLuaVM(); 16 | luaComp.DoFile("test.lua"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_UnityEngine_Input.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using LuaInterface; 3 | 4 | public class ToLua_UnityEngine_Input 5 | { 6 | public static string GetTouchDefined = 7 | @" try 8 | { 9 | int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); 10 | int arg1 = LuaDLL.luaL_optinteger(L, 2, TouchBits.ALL); 11 | UnityEngine.Touch o = UnityEngine.Input.GetTouch(arg0); 12 | ToLua.Push(L, o, arg1); 13 | return 1; 14 | } 15 | catch(Exception e) 16 | { 17 | return LuaDLL.toluaL_exception(L, e); 18 | }"; 19 | 20 | [UseDefinedAttribute] 21 | public static Touch GetTouch(int index, int flag) 22 | { 23 | return new Touch(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | CrashReportingSettings: 11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 12 | m_Enabled: 0 13 | m_CaptureEditorExceptions: 1 14 | UnityPurchasingSettings: 15 | m_Enabled: 0 16 | m_TestMode: 0 17 | UnityAnalyticsSettings: 18 | m_Enabled: 0 19 | m_InitializeOnStartup: 1 20 | m_TestMode: 0 21 | m_TestEventUrl: 22 | m_TestConfigUrl: 23 | UnityAdsSettings: 24 | m_Enabled: 0 25 | m_InitializeOnStartup: 1 26 | m_TestMode: 0 27 | m_EnabledPlatforms: 4294967295 28 | m_IosGameId: 29 | m_AndroidGameId: 30 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/AssetLabelEnsurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEditor; 4 | using System.Linq; 5 | 6 | namespace Game.Editor 7 | { 8 | /// 9 | /// 用于确保 Asset 上 Label 的编辑器类。 10 | /// 11 | public static class AssetLabelEnsurer 12 | { 13 | 14 | [MenuItem("Game/Ensure Asset Labels")] 15 | public static void Run() 16 | { 17 | var luaPaths = AssetDatabase.GetAllAssetPaths().Where(path => path.EndsWith(".lua")); 18 | foreach (var path in luaPaths) 19 | { 20 | var obj = AssetDatabase.LoadAssetAtPath(path, typeof(Object)); 21 | var curLabels = AssetDatabase.GetLabels(obj); 22 | AssetDatabase.SetLabels(obj, new HashSet(curLabels).Union(new string[] { EditorConst.LuaScriptAssetLabel }).ToArray()); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/slot.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local setmetatable = setmetatable 7 | 8 | local _slot = {} 9 | setmetatable(_slot, _slot) 10 | 11 | _slot.__call = function(self, ...) 12 | if nil == self.obj then 13 | return self.func(...) 14 | else 15 | return self.func(self.obj, ...) 16 | end 17 | end 18 | 19 | _slot.__eq = function (lhs, rhs) 20 | return lhs.func == rhs.func and lhs.obj == rhs.obj 21 | end 22 | 23 | --可用于 Timer 定时器回调函数. 例如Timer.New(slot(self.func, self)) 24 | function slot(func, obj) 25 | local st = {func = func, obj = obj} 26 | setmetatable(st, _slot) 27 | return st 28 | end -------------------------------------------------------------------------------- /Assets/GameFrameworkConfigs/AssetBundleEditor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Assets 6 | 7 | 8 | 9 | 10 | t:Scene t:Prefab t:Shader t:Model t:Material t:Texture t:AudioClip t:AnimationClip t:AnimatorController t:Font t:TextAsset t:ScriptableObject 11 | l:LuaScript 12 | t:Script 13 | l:AssetBundleExclusive 14 | Name 15 | 16 | 17 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/typeof.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local type = type 7 | local types = {} 8 | local _typeof = tolua.typeof 9 | local _findtype = tolua.findtype 10 | 11 | function typeof(obj) 12 | local t = type(obj) 13 | local ret = nil 14 | 15 | if t == "table" then 16 | ret = types[obj] 17 | 18 | if ret == nil then 19 | ret = _typeof(obj) 20 | types[obj] = ret 21 | end 22 | elseif t == "string" then 23 | ret = types[obj] 24 | 25 | if ret == nil then 26 | ret = _findtype(obj) 27 | types[obj] = ret 28 | end 29 | else 30 | error("attemp to call typeof on type "..t) 31 | end 32 | 33 | return ret 34 | end -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # =============== # 2 | # Unity generated # 3 | # =============== # 4 | [Tt]emp/ 5 | [Oo]bj/ 6 | [Uu]nityGenerated/ 7 | [Ll]ibrary/ 8 | [Aa]ssets/AssetStoreTools* 9 | 10 | # ===================================== # 11 | # Visual Studio / MonoDevelop generated # 12 | # ===================================== # 13 | ExportedObj/ 14 | *.svd 15 | *.userprefs 16 | *.csproj 17 | *.pidb 18 | *.suo 19 | *.sln 20 | *.user 21 | *.unityproj 22 | *.booproj 23 | 24 | # ============ # 25 | # OS generated # 26 | # ============ # 27 | .DS_Store 28 | .DS_Store? 29 | ._* 30 | .Spotlight-V100 31 | .Trashes 32 | Icon? 33 | ehthumbs.db 34 | Thumbs.db 35 | 36 | # ==================== # 37 | # Unity Game Framework # 38 | # ==================== # 39 | Assets/GameFrameworkConfigs/AssetBundleBuilder.xml 40 | Assets/GameFrameworkConfigs/AssetBundleBuilder.xml.meta 41 | 42 | # ============= # 43 | # Unity project # 44 | # ============= # 45 | Assets/StreamingAssets/ 46 | !Assets/StreamingAssets/.gitkeep 47 | 48 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_String.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using LuaInterface; 4 | 5 | public class ToLua_System_String 6 | { 7 | [NoToLuaAttribute] 8 | public static string ToLua_System_StringDefined = 9 | @" try 10 | { 11 | LuaTypes luatype = LuaDLL.lua_type(L, 1); 12 | 13 | if (luatype == LuaTypes.LUA_TSTRING) 14 | { 15 | string arg0 = LuaDLL.lua_tostring(L, 1); 16 | ToLua.PushObject(L, arg0); 17 | return 1; 18 | } 19 | else 20 | { 21 | return LuaDLL.luaL_throw(L, ""invalid arguments to string's ctor method""); 22 | } 23 | } 24 | catch(Exception e) 25 | { 26 | return LuaDLL.toluaL_exception(L, e); 27 | }"; 28 | 29 | [UseDefinedAttribute] 30 | public ToLua_System_String() 31 | { 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaField.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_LuaInterface_LuaField 5 | { 6 | public static string GetDefined = 7 | @" try 8 | { 9 | LuaInterface.LuaField obj = (LuaInterface.LuaField)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaField)); 10 | return obj.Get(L); 11 | } 12 | catch (Exception e) 13 | { 14 | return LuaDLL.toluaL_exception(L, e); 15 | }"; 16 | 17 | public static string SetDefined = 18 | @" try 19 | { 20 | LuaInterface.LuaField obj = (LuaInterface.LuaField)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaField)); 21 | return obj.Set(L); 22 | } 23 | catch (Exception e) 24 | { 25 | return LuaDLL.toluaL_exception(L, e); 26 | }"; 27 | 28 | [UseDefinedAttribute] 29 | public int Set(IntPtr L) 30 | { 31 | return 0; 32 | } 33 | 34 | [UseDefinedAttribute] 35 | public int Get(IntPtr L) 36 | { 37 | return 0; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_SpaceWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_SpaceWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.Space)); 10 | L.RegVar("World", get_World, null); 11 | L.RegVar("Self", get_Self, null); 12 | L.RegFunction("IntToEnum", IntToEnum); 13 | L.EndEnum(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int get_World(IntPtr L) 18 | { 19 | ToLua.Push(L, UnityEngine.Space.World); 20 | return 1; 21 | } 22 | 23 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 24 | static int get_Self(IntPtr L) 25 | { 26 | ToLua.Push(L, UnityEngine.Space.Self); 27 | return 1; 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int IntToEnum(IntPtr L) 32 | { 33 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 34 | UnityEngine.Space o = (UnityEngine.Space)arg0; 35 | ToLua.Push(L, o); 36 | return 1; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_LuaInterface_LuaMethod 5 | { 6 | public static string CallDefined = 7 | @" try 8 | { 9 | LuaInterface.LuaMethod obj = (LuaInterface.LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaMethod)); 10 | return obj.Call(L); 11 | } 12 | catch(Exception e) 13 | { 14 | return LuaDLL.toluaL_exception(L, e); 15 | }"; 16 | 17 | public static string DestroyDefined = 18 | @" try 19 | { 20 | ToLua.CheckArgsCount(L, 1); 21 | LuaInterface.LuaMethod obj = (LuaInterface.LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaMethod)); 22 | obj.Destroy(); 23 | ToLua.Destroy(L); 24 | return 0; 25 | } 26 | catch(Exception e) 27 | { 28 | return LuaDLL.toluaL_exception(L, e); 29 | }"; 30 | 31 | [UseDefinedAttribute] 32 | public int Call(IntPtr L) 33 | { 34 | return 0; 35 | } 36 | 37 | [UseDefinedAttribute] 38 | public void Destroy() 39 | { 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaProperty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_LuaInterface_LuaProperty 5 | { 6 | public static string GetDefined = 7 | @" try 8 | { 9 | LuaInterface.LuaProperty obj = (LuaInterface.LuaProperty)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaProperty)); 10 | return obj.Get(L); 11 | } 12 | catch (Exception e) 13 | { 14 | return LuaDLL.toluaL_exception(L, e); 15 | }"; 16 | 17 | public static string SetDefined = 18 | @" try 19 | { 20 | LuaInterface.LuaProperty obj = (LuaInterface.LuaProperty)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaProperty)); 21 | return obj.Set(L); 22 | } 23 | catch (Exception e) 24 | { 25 | return LuaDLL.toluaL_exception(L, e); 26 | }"; 27 | 28 | 29 | [UseDefinedAttribute] 30 | public int Set(IntPtr L) 31 | { 32 | return 0; 33 | } 34 | 35 | [UseDefinedAttribute] 36 | public int Get(IntPtr L) 37 | { 38 | return 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/Reflection/BindingFlags.lua: -------------------------------------------------------------------------------- 1 | if System.Reflection == nil then 2 | System.Reflection = {} 3 | end 4 | 5 | local function GetMask(...) 6 | local arg = {...} 7 | local value = 0 8 | 9 | for i = 1, #arg do 10 | value = value + arg[i] 11 | end 12 | 13 | return value 14 | end 15 | 16 | local BindingFlags = 17 | { 18 | Default = 0, 19 | IgnoreCase = 1, 20 | DeclaredOnly = 2, 21 | Instance = 4, 22 | Static = 8, 23 | Public = 16, 24 | NonPublic = 32, 25 | FlattenHierarchy = 64, 26 | InvokeMethod = 256, 27 | CreateInstance = 512, 28 | GetField = 1024, 29 | SetField = 2048, 30 | GetProperty = 4096, 31 | SetProperty = 8192, 32 | PutDispProperty = 16384, 33 | PutRefDispProperty = 32768, 34 | ExactBinding = 65536, 35 | SuppressChangeType = 131072, 36 | OptionalParamBinding = 262144, 37 | IgnoreReturn = 16777216, 38 | } 39 | 40 | System.Reflection.BindingFlags = BindingFlags 41 | System.Reflection.BindingFlags.GetMask = GetMask 42 | 43 | return BindingFlags -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_LuaConstructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_LuaInterface_LuaConstructor 5 | { 6 | public static string CallDefined = 7 | @" try 8 | { 9 | LuaInterface.LuaConstructor obj = (LuaInterface.LuaConstructor)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaConstructor)); 10 | return obj.Call(L); 11 | } 12 | catch(Exception e) 13 | { 14 | return LuaDLL.toluaL_exception(L, e); 15 | }"; 16 | 17 | public static string DestroyDefined = 18 | @" try 19 | { 20 | ToLua.CheckArgsCount(L, 1); 21 | LuaInterface.LuaConstructor obj = (LuaInterface.LuaConstructor)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaConstructor)); 22 | obj.Destroy(); 23 | ToLua.Destroy(L); 24 | return 0; 25 | } 26 | catch(Exception e) 27 | { 28 | return LuaDLL.toluaL_exception(L, e); 29 | }"; 30 | 31 | [UseDefinedAttribute] 32 | public void Destroy() 33 | { 34 | 35 | } 36 | 37 | [UseDefinedAttribute] 38 | public int Call(IntPtr L) 39 | { 40 | return 0; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_PlayModeWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_PlayModeWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.PlayMode)); 10 | L.RegVar("StopSameLayer", get_StopSameLayer, null); 11 | L.RegVar("StopAll", get_StopAll, null); 12 | L.RegFunction("IntToEnum", IntToEnum); 13 | L.EndEnum(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int get_StopSameLayer(IntPtr L) 18 | { 19 | ToLua.Push(L, UnityEngine.PlayMode.StopSameLayer); 20 | return 1; 21 | } 22 | 23 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 24 | static int get_StopAll(IntPtr L) 25 | { 26 | ToLua.Push(L, UnityEngine.PlayMode.StopAll); 27 | return 1; 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int IntToEnum(IntPtr L) 32 | { 33 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 34 | UnityEngine.PlayMode o = (UnityEngine.PlayMode)arg0; 35 | ToLua.Push(L, o); 36 | return 1; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-2017 Jiang Yin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_QueueModeWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_QueueModeWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.QueueMode)); 10 | L.RegVar("CompleteOthers", get_CompleteOthers, null); 11 | L.RegVar("PlayNow", get_PlayNow, null); 12 | L.RegFunction("IntToEnum", IntToEnum); 13 | L.EndEnum(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int get_CompleteOthers(IntPtr L) 18 | { 19 | ToLua.Push(L, UnityEngine.QueueMode.CompleteOthers); 20 | return 1; 21 | } 22 | 23 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 24 | static int get_PlayNow(IntPtr L) 25 | { 26 | ToLua.Push(L, UnityEngine.QueueMode.PlayNow); 27 | return 1; 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int IntToEnum(IntPtr L) 32 | { 33 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 34 | UnityEngine.QueueMode o = (UnityEngine.QueueMode)arg0; 35 | ToLua.Push(L, o); 36 | return 1; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_AnimationBlendModeWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_AnimationBlendModeWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.AnimationBlendMode)); 10 | L.RegVar("Blend", get_Blend, null); 11 | L.RegVar("Additive", get_Additive, null); 12 | L.RegFunction("IntToEnum", IntToEnum); 13 | L.EndEnum(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int get_Blend(IntPtr L) 18 | { 19 | ToLua.Push(L, UnityEngine.AnimationBlendMode.Blend); 20 | return 1; 21 | } 22 | 23 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 24 | static int get_Additive(IntPtr L) 25 | { 26 | ToLua.Push(L, UnityEngine.AnimationBlendMode.Additive); 27 | return 1; 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int IntToEnum(IntPtr L) 32 | { 33 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 34 | UnityEngine.AnimationBlendMode o = (UnityEngine.AnimationBlendMode)arg0; 35 | ToLua.Push(L, o); 36 | return 1; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs/armeabi-v7a/libtolua.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fb9a29f65e536b4293f7f9affd19158 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 1 11 | settings: 12 | CPU: ARMv7 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 0 18 | settings: 19 | CPU: AnyCPU 20 | DefaultValueInitialized: true 21 | OS: AnyOS 22 | Linux: 23 | enabled: 0 24 | settings: 25 | CPU: x86 26 | Linux64: 27 | enabled: 0 28 | settings: 29 | CPU: x86_64 30 | OSXIntel: 31 | enabled: 0 32 | settings: 33 | CPU: AnyCPU 34 | OSXIntel64: 35 | enabled: 0 36 | settings: 37 | CPU: AnyCPU 38 | Win: 39 | enabled: 0 40 | settings: 41 | CPU: AnyCPU 42 | Win64: 43 | enabled: 0 44 | settings: 45 | CPU: AnyCPU 46 | iOS: 47 | enabled: 0 48 | settings: 49 | CompileFlags: 50 | FrameworkDependencies: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/misc/strict.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- strict.lua 3 | -- checks uses of undeclared global variables 4 | -- All global variables must be 'declared' through a regular assignment 5 | -- (even assigning nil will do) in a main chunk before being used 6 | -- anywhere or assigned to inside a function. 7 | -- 8 | -- modified for better compatibility with LuaJIT, see: 9 | -- http://www.freelists.org/post/luajit/strictlua-with-stripped-bytecode 10 | 11 | local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget 12 | 13 | local mt = getmetatable(_G) 14 | if mt == nil then 15 | mt = {} 16 | setmetatable(_G, mt) 17 | end 18 | 19 | mt.__declared = {} 20 | 21 | mt.__newindex = function (t, n, v) 22 | if not mt.__declared[n] then 23 | local info = getinfo(2, "S") 24 | if info and info.linedefined > 0 then 25 | error("assign to undeclared variable '"..n.."'", 2) 26 | end 27 | mt.__declared[n] = true 28 | end 29 | rawset(t, n, v) 30 | end 31 | 32 | mt.__index = function (t, n) 33 | if not mt.__declared[n] then 34 | local info = getinfo(2, "S") 35 | if info and info.linedefined > 0 then 36 | error("variable '"..n.."' is not declared", 2) 37 | end 38 | end 39 | return rawget(t, n) 40 | end 41 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/iOS/libtolua.a.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54c35a8b7bc7347e0a91ff24faf55409 3 | timeCreated: 1456833383 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 0 13 | settings: 14 | CPU: AnyCPU 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: x86_64 32 | OSXIntel: 33 | enabled: 0 34 | settings: 35 | CPU: AnyCPU 36 | OSXIntel64: 37 | enabled: 0 38 | settings: 39 | CPU: AnyCPU 40 | Win: 41 | enabled: 0 42 | settings: 43 | CPU: AnyCPU 44 | Win64: 45 | enabled: 0 46 | settings: 47 | CPU: AnyCPU 48 | iOS: 49 | enabled: 1 50 | settings: 51 | CompileFlags: 52 | FrameworkDependencies: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/Android/libs/x86/libtolua.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3f1ad25b4054b34d9105289ee492b57 3 | timeCreated: 1471082297 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 1 13 | settings: 14 | CPU: x86 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: x86_64 32 | OSXIntel: 33 | enabled: 0 34 | settings: 35 | CPU: AnyCPU 36 | OSXIntel64: 37 | enabled: 0 38 | settings: 39 | CPU: AnyCPU 40 | Win: 41 | enabled: 0 42 | settings: 43 | CPU: AnyCPU 44 | Win64: 45 | enabled: 0 46 | settings: 47 | CPU: AnyCPU 48 | iOS: 49 | enabled: 0 50 | settings: 51 | CompileFlags: 52 | FrameworkDependencies: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/GameFrameworkExtensions/Lua/Scripts/CustomLuaLoader.cs: -------------------------------------------------------------------------------- 1 | using LuaInterface; 2 | using UnityEngine; 3 | 4 | namespace UnityGameFramework.Runtime.Lua 5 | { 6 | /// 7 | /// 自定义 Lua 资源加载器。 8 | /// 9 | public class CustomLuaLoader : LuaFileUtils 10 | { 11 | public delegate bool GetScript(string fileName, out byte[] buffer); 12 | 13 | private GetScript m_GetScript; 14 | 15 | public CustomLuaLoader(GetScript getScript) : base() 16 | { 17 | m_GetScript = getScript; 18 | } 19 | 20 | public override byte[] ReadFile(string fileName) 21 | { 22 | if (Application.isEditor && GameEntry.GetComponent().EditorResourceMode) 23 | { 24 | return base.ReadFile(fileName); 25 | } 26 | 27 | if (!fileName.EndsWith(".lua")) 28 | { 29 | fileName += ".lua"; 30 | } 31 | 32 | byte[] buffer; 33 | if (!m_GetScript(fileName, out buffer)) 34 | { 35 | throw new GameFramework.GameFrameworkException(string.Format("File '{0}' not loaded.", fileName)); 36 | } 37 | 38 | return buffer; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/LuaConst.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public static class LuaConst 4 | { 5 | // UGF 6 | public static string luaDir = Application.dataPath + "/ToLua/Lua"; //lua逻辑代码目录 7 | public static string toluaDir = Application.dataPath + "/ToLua/ToLua/Lua"; //tolua lua文件目录 8 | // !UGF 9 | 10 | #if UNITY_STANDALONE 11 | public static string osDir = "Win"; 12 | #elif UNITY_ANDROID 13 | public static string osDir = "Android"; 14 | #elif UNITY_IPHONE 15 | public static string osDir = "iOS"; 16 | #else 17 | public static string osDir = ""; 18 | #endif 19 | 20 | public static string luaResDir = string.Format("{0}/{1}/Lua", Application.persistentDataPath, osDir); //手机运行时lua文件下载目录 21 | 22 | #if UNITY_EDITOR_WIN || NITY_STANDALONE_WIN 23 | public static string zbsDir = "D:/ZeroBraneStudio/lualibs/mobdebug"; //ZeroBraneStudio目录 24 | #elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX 25 | public static string zbsDir = "/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/mobdebug"; 26 | #else 27 | public static string zbsDir = luaResDir + "/mobdebug/"; 28 | #endif 29 | 30 | public static bool openLuaSocket = true; //是否打开Lua Socket库 31 | public static bool openZbsDebugger = false; //是否连接ZeroBraneStudio调试 32 | } -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/x86/tolua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f4af3c74c7469d498c7c7c7a40ead91 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 0 11 | settings: 12 | CPU: AnyCPU 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 1 18 | settings: 19 | CPU: x86 20 | DefaultValueInitialized: true 21 | OS: Windows 22 | Linux: 23 | enabled: 1 24 | settings: 25 | CPU: x86 26 | Linux64: 27 | enabled: 0 28 | settings: 29 | CPU: None 30 | LinuxUniversal: 31 | enabled: 0 32 | settings: 33 | CPU: x86 34 | OSXIntel: 35 | enabled: 1 36 | settings: 37 | CPU: AnyCPU 38 | OSXIntel64: 39 | enabled: 0 40 | settings: 41 | CPU: None 42 | OSXUniversal: 43 | enabled: 0 44 | settings: 45 | CPU: x86 46 | Win: 47 | enabled: 1 48 | settings: 49 | CPU: AnyCPU 50 | Win64: 51 | enabled: 0 52 | settings: 53 | CPU: None 54 | iOS: 55 | enabled: 0 56 | settings: 57 | CompileFlags: 58 | FrameworkDependencies: 59 | userData: 60 | assetBundleName: 61 | assetBundleVariant: 62 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/LayerMask.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local Layer = Layer 7 | local rawget = rawget 8 | local setmetatable = setmetatable 9 | 10 | local LayerMask = {} 11 | 12 | LayerMask.__index = function(t,k) 13 | return rawget(LayerMask, k) 14 | end 15 | 16 | LayerMask.__call = function(t,v) 17 | return LayerMask.New(v) 18 | end 19 | 20 | function LayerMask.New(value) 21 | local layer = {value = value or 0} 22 | setmetatable(layer, LayerMask) 23 | return layer 24 | end 25 | 26 | function LayerMask:Get() 27 | return self.value 28 | end 29 | 30 | function LayerMask.NameToLayer(name) 31 | return Layer[name] 32 | end 33 | 34 | function LayerMask.GetMask(...) 35 | local arg = {...} 36 | local value = 0 37 | 38 | for i = 1, #arg do 39 | local n = LayerMask.NameToLayer(arg[i]) 40 | 41 | if n ~= nil then 42 | value = value + 2 ^ n 43 | end 44 | end 45 | 46 | return value 47 | end 48 | 49 | UnityEngine.LayerMask = LayerMask 50 | setmetatable(LayerMask, LayerMask) 51 | return LayerMask 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/x86_64/tolua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82bce848ef6ade348a8220c2ada7da08 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 0 11 | settings: 12 | CPU: AnyCPU 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 1 18 | settings: 19 | CPU: x86_64 20 | DefaultValueInitialized: true 21 | OS: Windows 22 | Linux: 23 | enabled: 0 24 | settings: 25 | CPU: None 26 | Linux64: 27 | enabled: 1 28 | settings: 29 | CPU: x86_64 30 | LinuxUniversal: 31 | enabled: 0 32 | settings: 33 | CPU: x86_64 34 | OSXIntel: 35 | enabled: 0 36 | settings: 37 | CPU: None 38 | OSXIntel64: 39 | enabled: 1 40 | settings: 41 | CPU: AnyCPU 42 | OSXUniversal: 43 | enabled: 0 44 | settings: 45 | CPU: x86_64 46 | Win: 47 | enabled: 0 48 | settings: 49 | CPU: None 50 | Win64: 51 | enabled: 1 52 | settings: 53 | CPU: AnyCPU 54 | iOS: 55 | enabled: 0 56 | settings: 57 | CompileFlags: 58 | FrameworkDependencies: 59 | userData: 60 | assetBundleName: 61 | assetBundleVariant: 62 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaOutWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class LuaInterface_LuaOutWrap 5 | { 6 | public static void Register(LuaState L) 7 | { 8 | //L.BeginClass(typeof(LuaInterface.LuaOutMetatable), null); 9 | //L.EndClass(); 10 | L.BeginPreLoad(); 11 | L.RegFunction("tolua.out", LuaOpen_ToLua_Out); 12 | L.EndPreLoad(); 13 | } 14 | 15 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 16 | static int LuaOpen_ToLua_Out(IntPtr L) 17 | { 18 | LuaDLL.lua_newtable(L); 19 | 20 | RawSetOutType(L); 21 | RawSetOutType(L); 22 | RawSetOutType(L); 23 | RawSetOutType(L); 24 | RawSetOutType(L); 25 | RawSetOutType(L); 26 | RawSetOutType(L); 27 | RawSetOutType(L); 28 | RawSetOutType(L); 29 | RawSetOutType(L); 30 | RawSetOutType(L); 31 | RawSetOutType(L); 32 | 33 | return 1; 34 | } 35 | 36 | static void RawSetOutType(IntPtr L) 37 | { 38 | string str = LuaMisc.GetPrimitiveStr(typeof(T)); 39 | LuaDLL.lua_pushstring(L, str); 40 | ToLua.PushOut(L, new LuaOut()); 41 | LuaDLL.lua_rawset(L, -3); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_BlendWeightsWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_BlendWeightsWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.BlendWeights)); 10 | L.RegVar("OneBone", get_OneBone, null); 11 | L.RegVar("TwoBones", get_TwoBones, null); 12 | L.RegVar("FourBones", get_FourBones, null); 13 | L.RegFunction("IntToEnum", IntToEnum); 14 | L.EndEnum(); 15 | } 16 | 17 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 18 | static int get_OneBone(IntPtr L) 19 | { 20 | ToLua.Push(L, UnityEngine.BlendWeights.OneBone); 21 | return 1; 22 | } 23 | 24 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 25 | static int get_TwoBones(IntPtr L) 26 | { 27 | ToLua.Push(L, UnityEngine.BlendWeights.TwoBones); 28 | return 1; 29 | } 30 | 31 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 32 | static int get_FourBones(IntPtr L) 33 | { 34 | ToLua.Push(L, UnityEngine.BlendWeights.FourBones); 35 | return 1; 36 | } 37 | 38 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 39 | static int IntToEnum(IntPtr L) 40 | { 41 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 42 | UnityEngine.BlendWeights o = (UnityEngine.BlendWeights)arg0; 43 | ToLua.Push(L, o); 44 | return 1; 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd30d03bd8185a44ba7bc7fbfcca2201 3 | folderAsset: yes 4 | PluginImporter: 5 | serializedVersion: 1 6 | iconMap: {} 7 | executionOrder: {} 8 | isPreloaded: 0 9 | platformData: 10 | Android: 11 | enabled: 0 12 | settings: 13 | CPU: AnyCPU 14 | Any: 15 | enabled: 0 16 | settings: {} 17 | Editor: 18 | enabled: 1 19 | settings: 20 | CPU: AnyCPU 21 | DefaultValueInitialized: true 22 | OS: OSX 23 | Linux: 24 | enabled: 1 25 | settings: 26 | CPU: x86 27 | Linux64: 28 | enabled: 1 29 | settings: 30 | CPU: x86_64 31 | LinuxUniversal: 32 | enabled: 1 33 | settings: 34 | CPU: AnyCPU 35 | OSXIntel: 36 | enabled: 1 37 | settings: 38 | CPU: AnyCPU 39 | OSXIntel64: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | OSXUniversal: 44 | enabled: 1 45 | settings: 46 | CPU: AnyCPU 47 | Win: 48 | enabled: 1 49 | settings: 50 | CPU: AnyCPU 51 | Win64: 52 | enabled: 1 53 | settings: 54 | CPU: AnyCPU 55 | iOS: 56 | enabled: 0 57 | settings: 58 | CompileFlags: 59 | FrameworkDependencies: 60 | userData: 61 | assetBundleName: 62 | assetBundleVariant: 63 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_MinPenetrationForPenalty: 0.01 17 | m_BaumgarteScale: 0.2 18 | m_BaumgarteTimeOfImpactScale: 0.75 19 | m_TimeToSleep: 0.5 20 | m_LinearSleepTolerance: 0.01 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_AlwaysShowColliders: 0 26 | m_ShowColliderSleep: 1 27 | m_ShowColliderContacts: 0 28 | m_ShowColliderAABB: 0 29 | m_ContactArrowScale: 0.2 30 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 31 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 32 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 33 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 34 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 35 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/listener.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -------------------------------------------------------------------------------- 3 | -- FILE: listener.lua 4 | -- DESCRIPTION: protoc-gen-lua 5 | -- Google's Protocol Buffers project, ported to lua. 6 | -- https://code.google.com/p/protoc-gen-lua/ 7 | -- 8 | -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com 9 | -- All rights reserved. 10 | -- 11 | -- Use, modification and distribution are subject to the "New BSD License" 12 | -- as listed at . 13 | -- 14 | -- COMPANY: NetEase 15 | -- CREATED: 2010年08月02日 17时35分25秒 CST 16 | -------------------------------------------------------------------------------- 17 | -- 18 | local setmetatable = setmetatable 19 | 20 | module "protobuf.listener" 21 | 22 | local _null_listener = { 23 | Modified = function() 24 | end 25 | } 26 | 27 | function NullMessageListener() 28 | return _null_listener 29 | end 30 | 31 | local _listener_meta = { 32 | Modified = function(self) 33 | if self.dirty then 34 | return 35 | end 36 | if self._parent_message then 37 | self._parent_message:_Modified() 38 | end 39 | end 40 | } 41 | _listener_meta.__index = _listener_meta 42 | 43 | function Listener(parent_message) 44 | local o = {} 45 | o.__mode = "v" 46 | o._parent_message = parent_message 47 | o.dirty = false 48 | return setmetatable(o, _listener_meta) 49 | end 50 | 51 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Ray.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local rawget = rawget 7 | local setmetatable = setmetatable 8 | 9 | local Ray = {} 10 | local get = tolua.initget(Ray) 11 | 12 | Ray.__index = function(t,k) 13 | local var = rawget(Ray, k) 14 | 15 | if var == nil then 16 | var = rawget(get, k) 17 | 18 | if var ~= nil then 19 | return var(t) 20 | end 21 | end 22 | 23 | return var 24 | end 25 | 26 | Ray.__call = function(t, direction, origin) 27 | return Ray.New(direction, origin) 28 | end 29 | 30 | function Ray.New(direction, origin) 31 | local ray = {} 32 | ray.direction = direction:Normalize() 33 | ray.origin = origin 34 | setmetatable(ray, Ray) 35 | return ray 36 | end 37 | 38 | function Ray:GetPoint(distance) 39 | local dir = self.direction * distance 40 | dir:Add(self.origin) 41 | return dir 42 | end 43 | 44 | function Ray:Get() 45 | return self.origin, self.direction 46 | end 47 | 48 | Ray.__tostring = function(self) 49 | return string.format("Origin:(%f,%f,%f),Dir:(%f,%f, %f)", self.origin.x, self.origin.y, self.origin.z, self.direction.x, self.direction.y, self.direction.z) 50 | end 51 | 52 | UnityEngine.Ray = Ray 53 | setmetatable(Ray, Ray) 54 | return Ray -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/tolua.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | if jit then 7 | if jit.opt then 8 | jit.opt.start(3) 9 | end 10 | print("jit", jit.status()) 11 | print(string.format("os: %s, arch: %s", jit.os, jit.arch)) 12 | end 13 | 14 | if DebugServerIp then 15 | require("mobdebug").start(DebugServerIp) 16 | end 17 | 18 | require "misc.functions" 19 | Mathf = require "UnityEngine.Mathf" 20 | Vector3 = require "UnityEngine.Vector3" 21 | Quaternion = require "UnityEngine.Quaternion" 22 | Vector2 = require "UnityEngine.Vector2" 23 | Vector4 = require "UnityEngine.Vector4" 24 | Color = require "UnityEngine.Color" 25 | Ray = require "UnityEngine.Ray" 26 | Bounds = require "UnityEngine.Bounds" 27 | RaycastHit = require "UnityEngine.RaycastHit" 28 | Touch = require "UnityEngine.Touch" 29 | LayerMask = require "UnityEngine.LayerMask" 30 | Plane = require "UnityEngine.Plane" 31 | Time = reimport "UnityEngine.Time" 32 | 33 | list = require "list" 34 | utf8 = require "misc.utf8" 35 | 36 | require "event" 37 | require "typeof" 38 | require "slot" 39 | require "System.Timer" 40 | require "System.coroutine" 41 | require "System.ValueType" 42 | require "System.Reflection.BindingFlags" 43 | 44 | --require "misc.strict" 45 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_LightTypeWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_LightTypeWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.LightType)); 10 | L.RegVar("Spot", get_Spot, null); 11 | L.RegVar("Directional", get_Directional, null); 12 | L.RegVar("Point", get_Point, null); 13 | L.RegVar("Area", get_Area, null); 14 | L.RegFunction("IntToEnum", IntToEnum); 15 | L.EndEnum(); 16 | } 17 | 18 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 19 | static int get_Spot(IntPtr L) 20 | { 21 | ToLua.Push(L, UnityEngine.LightType.Spot); 22 | return 1; 23 | } 24 | 25 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 26 | static int get_Directional(IntPtr L) 27 | { 28 | ToLua.Push(L, UnityEngine.LightType.Directional); 29 | return 1; 30 | } 31 | 32 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 33 | static int get_Point(IntPtr L) 34 | { 35 | ToLua.Push(L, UnityEngine.LightType.Point); 36 | return 1; 37 | } 38 | 39 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 40 | static int get_Area(IntPtr L) 41 | { 42 | ToLua.Push(L, UnityEngine.LightType.Area); 43 | return 1; 44 | } 45 | 46 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 47 | static int IntToEnum(IntPtr L) 48 | { 49 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 50 | UnityEngine.LightType o = (UnityEngine.LightType)arg0; 51 | ToLua.Push(L, o); 52 | return 1; 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaFieldWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class LuaInterface_LuaFieldWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(LuaInterface.LuaField), typeof(System.Object)); 10 | L.RegFunction("Get", Get); 11 | L.RegFunction("Set", Set); 12 | L.RegFunction("__tostring", Lua_ToString); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int Get(IntPtr L) 18 | { 19 | try 20 | { 21 | LuaInterface.LuaField obj = (LuaInterface.LuaField)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaField)); 22 | return obj.Get(L); 23 | } 24 | catch (Exception e) 25 | { 26 | return LuaDLL.toluaL_exception(L, e); 27 | } 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int Set(IntPtr L) 32 | { 33 | try 34 | { 35 | LuaInterface.LuaField obj = (LuaInterface.LuaField)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaField)); 36 | return obj.Set(L); 37 | } 38 | catch (Exception e) 39 | { 40 | return LuaDLL.toluaL_exception(L, e); 41 | } 42 | } 43 | 44 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 45 | static int Lua_ToString(IntPtr L) 46 | { 47 | object obj = ToLua.ToObject(L, 1); 48 | 49 | if (obj != null) 50 | { 51 | LuaDLL.lua_pushstring(L, obj.ToString()); 52 | } 53 | else 54 | { 55 | LuaDLL.lua_pushnil(L); 56 | } 57 | 58 | return 1; 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaPropertyWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class LuaInterface_LuaPropertyWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(LuaInterface.LuaProperty), typeof(System.Object)); 10 | L.RegFunction("Get", Get); 11 | L.RegFunction("Set", Set); 12 | L.RegFunction("__tostring", Lua_ToString); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int Get(IntPtr L) 18 | { 19 | try 20 | { 21 | LuaInterface.LuaProperty obj = (LuaInterface.LuaProperty)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaProperty)); 22 | return obj.Get(L); 23 | } 24 | catch (Exception e) 25 | { 26 | return LuaDLL.toluaL_exception(L, e); 27 | } 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int Set(IntPtr L) 32 | { 33 | try 34 | { 35 | LuaInterface.LuaProperty obj = (LuaInterface.LuaProperty)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaProperty)); 36 | return obj.Set(L); 37 | } 38 | catch (Exception e) 39 | { 40 | return LuaDLL.toluaL_exception(L, e); 41 | } 42 | } 43 | 44 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 45 | static int Lua_ToString(IntPtr L) 46 | { 47 | object obj = ToLua.ToObject(L, 1); 48 | 49 | if (obj != null) 50 | { 51 | LuaDLL.lua_pushstring(L, obj.ToString()); 52 | } 53 | else 54 | { 55 | LuaDLL.lua_pushnil(L); 56 | } 57 | 58 | return 1; 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_LuaInterface_EventObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_LuaInterface_EventObject 5 | { 6 | [NoToLuaAttribute] 7 | public static string op_AdditionDefined = 8 | @" try 9 | { 10 | LuaInterface.EventObject arg0 = (LuaInterface.EventObject)ToLua.CheckObject(L, 1, typeof(LuaInterface.EventObject)); 11 | arg0.func = ToLua.CheckLuaFunction(L, 2); 12 | arg0.op = EventOp.Add; 13 | ToLua.Push(L, arg0); 14 | return 1; 15 | } 16 | catch (Exception e) 17 | { 18 | return LuaDLL.toluaL_exception(L, e); 19 | }"; 20 | 21 | [NoToLuaAttribute] 22 | public static string op_SubtractionDefined = 23 | @" try 24 | { 25 | LuaInterface.EventObject arg0 = (LuaInterface.EventObject)ToLua.CheckObject(L, 1, typeof(LuaInterface.EventObject)); 26 | arg0.func = ToLua.CheckLuaFunction(L, 2); 27 | arg0.op = EventOp.Sub; 28 | ToLua.Push(L, arg0); 29 | return 1; 30 | } 31 | catch (Exception e) 32 | { 33 | return LuaDLL.toluaL_exception(L, e); 34 | }"; 35 | 36 | [UseDefinedAttribute] 37 | public static ToLua_LuaInterface_EventObject operator +(ToLua_LuaInterface_EventObject a, ToLua_LuaInterface_EventObject b) 38 | { 39 | return null; 40 | } 41 | 42 | [UseDefinedAttribute] 43 | public static ToLua_LuaInterface_EventObject operator -(ToLua_LuaInterface_EventObject a, ToLua_LuaInterface_EventObject b) 44 | { 45 | return null; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_Generic_KeyValuePairWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | using System.Collections.Generic; 4 | 5 | public class System_Collections_Generic_KeyValuePairWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(KeyValuePair<,>), null, "KeyValuePair"); 10 | L.RegFunction("__tostring", ToLua.op_ToString); 11 | L.RegVar("Key", get_Key, null); 12 | L.RegVar("Value", get_Value, null); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int get_Key(IntPtr L) 18 | { 19 | object o = null; 20 | 21 | try 22 | { 23 | o = ToLua.ToObject(L, 1); 24 | object ret = LuaMethodCache.CallSingleMethod("get_Key", o); 25 | ToLua.Push(L, ret); 26 | return 1; 27 | } 28 | catch (Exception e) 29 | { 30 | return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Key on a nil value" : e.Message); 31 | } 32 | } 33 | 34 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 35 | static int get_Value(IntPtr L) 36 | { 37 | object o = null; 38 | 39 | try 40 | { 41 | o = ToLua.ToObject(L, 1); 42 | object ret = LuaMethodCache.CallSingleMethod("get_Value", o); 43 | ToLua.Push(L, ret); 44 | return 1; 45 | } 46 | catch (Exception e) 47 | { 48 | return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Value on a nil value" : e.Message); 49 | } 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaMethodWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class LuaInterface_LuaMethodWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(LuaInterface.LuaMethod), typeof(System.Object)); 10 | L.RegFunction("Destroy", Destroy); 11 | L.RegFunction("Call", Call); 12 | L.RegFunction("__tostring", Lua_ToString); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int Destroy(IntPtr L) 18 | { 19 | try 20 | { 21 | ToLua.CheckArgsCount(L, 1); 22 | LuaInterface.LuaMethod obj = (LuaInterface.LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaMethod)); 23 | obj.Destroy(); 24 | ToLua.Destroy(L); 25 | return 0; 26 | } 27 | catch(Exception e) 28 | { 29 | return LuaDLL.toluaL_exception(L, e); 30 | } 31 | } 32 | 33 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 34 | static int Call(IntPtr L) 35 | { 36 | try 37 | { 38 | LuaInterface.LuaMethod obj = (LuaInterface.LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaMethod)); 39 | return obj.Call(L); 40 | } 41 | catch(Exception e) 42 | { 43 | return LuaDLL.toluaL_exception(L, e); 44 | } 45 | } 46 | 47 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 48 | static int Lua_ToString(IntPtr L) 49 | { 50 | object obj = ToLua.ToObject(L, 1); 51 | 52 | if (obj != null) 53 | { 54 | LuaDLL.lua_pushstring(L, obj.ToString()); 55 | } 56 | else 57 | { 58 | LuaDLL.lua_pushnil(L); 59 | } 60 | 61 | return 1; 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Type.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using LuaInterface; 4 | 5 | public class ToLua_System_Type 6 | { 7 | [NoToLuaAttribute] 8 | public EventInfo GetEvent(string name) 9 | { 10 | return null; 11 | } 12 | 13 | [NoToLuaAttribute] 14 | public EventInfo[] GetEvents() 15 | { 16 | return null; 17 | } 18 | 19 | [NoToLuaAttribute] 20 | public MethodInfo GetMethod(string name) 21 | { 22 | return null; 23 | } 24 | 25 | [NoToLuaAttribute] 26 | public MethodInfo[] GetMethods() 27 | { 28 | return null; 29 | } 30 | 31 | [NoToLuaAttribute] 32 | public PropertyInfo GetProperty(string name) 33 | { 34 | return null; 35 | } 36 | 37 | [NoToLuaAttribute] 38 | public PropertyInfo[] GetProperties() 39 | { 40 | return null; 41 | } 42 | 43 | [NoToLuaAttribute] 44 | public FieldInfo GetField(string name) 45 | { 46 | return null; 47 | } 48 | 49 | [NoToLuaAttribute] 50 | public FieldInfo[] GetFields() 51 | { 52 | return null; 53 | } 54 | 55 | [NoToLuaAttribute] 56 | public ConstructorInfo GetConstructor(Type[] types) 57 | { 58 | return null; 59 | } 60 | 61 | [NoToLuaAttribute] 62 | public ConstructorInfo[] GetConstructors() 63 | { 64 | return null; 65 | } 66 | 67 | [NoToLuaAttribute] 68 | public MemberInfo[] GetMember(string name) 69 | { 70 | return null; 71 | } 72 | 73 | [NoToLuaAttribute] 74 | public MemberInfo[] GetMembers() 75 | { 76 | return null; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_LuaConstructorWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class LuaInterface_LuaConstructorWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(LuaInterface.LuaConstructor), typeof(System.Object)); 10 | L.RegFunction("Call", Call); 11 | L.RegFunction("Destroy", Destroy); 12 | L.RegFunction("__tostring", Lua_ToString); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int Call(IntPtr L) 18 | { 19 | try 20 | { 21 | LuaInterface.LuaConstructor obj = (LuaInterface.LuaConstructor)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaConstructor)); 22 | return obj.Call(L); 23 | } 24 | catch(Exception e) 25 | { 26 | return LuaDLL.toluaL_exception(L, e); 27 | } 28 | } 29 | 30 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 31 | static int Destroy(IntPtr L) 32 | { 33 | try 34 | { 35 | ToLua.CheckArgsCount(L, 1); 36 | LuaInterface.LuaConstructor obj = (LuaInterface.LuaConstructor)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaConstructor)); 37 | obj.Destroy(); 38 | ToLua.Destroy(L); 39 | return 0; 40 | } 41 | catch(Exception e) 42 | { 43 | return LuaDLL.toluaL_exception(L, e); 44 | } 45 | } 46 | 47 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 48 | static int Lua_ToString(IntPtr L) 49 | { 50 | object obj = ToLua.ToObject(L, 1); 51 | 52 | if (obj != null) 53 | { 54 | LuaDLL.lua_pushstring(L, obj.ToString()); 55 | } 56 | else 57 | { 58 | LuaDLL.lua_pushnil(L); 59 | } 60 | 61 | return 1; 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/System/ValueType.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local getmetatable = getmetatable 7 | local Vector3 = Vector3 8 | local Vector2 = Vector2 9 | local Vector4 = Vector4 10 | local Quaternion = Quaternion 11 | local Color = Color 12 | local Ray = Ray 13 | local Bounds = Bounds 14 | local Touch = Touch 15 | local LayerMask = LayerMask 16 | local RaycastHit = RaycastHit 17 | 18 | local ValueType = 19 | { 20 | None = 0, 21 | Vector3 = 1, 22 | Quaternion = 2, 23 | Vector2 = 3, 24 | Color = 4, 25 | Vector4 = 5, 26 | Ray = 6, 27 | Bounds = 7, 28 | Touch = 8, 29 | LayerMask = 9, 30 | RaycastHit = 10, 31 | } 32 | 33 | function GetLuaValueType(udata) 34 | local meta = getmetatable(udata) 35 | 36 | if meta == nil then 37 | return ValueType.None 38 | elseif meta == Vector3 then 39 | return ValueType.Vector3 40 | elseif meta == Quaternion then 41 | return ValueType.Quaternion 42 | elseif meta == Vector4 then 43 | return ValueType.Vector4 44 | elseif meta == Vector2 then 45 | return ValueType.Vector2 46 | elseif meta == Color then 47 | return ValueType.Color 48 | elseif meta == Ray then 49 | return ValueType.Ray 50 | elseif meta == Bounds then 51 | return ValueType.Bounds 52 | elseif meta == Touch then 53 | return ValueType.Touch 54 | elseif meta == LayerMask then 55 | return ValueType.LayerMask 56 | elseif meta == RaycastHit then 57 | return ValueType.RaycastHit 58 | else 59 | return ValueType.None 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/misc/functions.lua: -------------------------------------------------------------------------------- 1 | local require = require 2 | local string = string 3 | local table = table 4 | 5 | function string.split(input, delimiter) 6 | input = tostring(input) 7 | delimiter = tostring(delimiter) 8 | if (delimiter=='') then return false end 9 | local pos,arr = 0, {} 10 | -- for each divider found 11 | for st,sp in function() return string.find(input, delimiter, pos, true) end do 12 | table.insert(arr, string.sub(input, pos, st - 1)) 13 | pos = sp + 1 14 | end 15 | table.insert(arr, string.sub(input, pos)) 16 | return arr 17 | end 18 | 19 | function import(moduleName, currentModuleName) 20 | local currentModuleNameParts 21 | local moduleFullName = moduleName 22 | local offset = 1 23 | 24 | while true do 25 | if string.byte(moduleName, offset) ~= 46 then -- . 26 | moduleFullName = string.sub(moduleName, offset) 27 | if currentModuleNameParts and #currentModuleNameParts > 0 then 28 | moduleFullName = table.concat(currentModuleNameParts, ".") .. "." .. moduleFullName 29 | end 30 | break 31 | end 32 | offset = offset + 1 33 | 34 | if not currentModuleNameParts then 35 | if not currentModuleName then 36 | local n,v = debug.getlocal(3, 1) 37 | currentModuleName = v 38 | end 39 | 40 | currentModuleNameParts = string.split(currentModuleName, ".") 41 | end 42 | table.remove(currentModuleNameParts, #currentModuleNameParts) 43 | end 44 | 45 | return require(moduleFullName) 46 | end 47 | 48 | --重新require一个lua文件,替代系统文件。 49 | function reimport(name) 50 | local package = package 51 | package.loaded[name] = nil 52 | package.preload[name] = nil 53 | return require(name) 54 | end 55 | 56 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_CameraClearFlagsWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_CameraClearFlagsWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.CameraClearFlags)); 10 | L.RegVar("Skybox", get_Skybox, null); 11 | L.RegVar("Color", get_Color, null); 12 | L.RegVar("SolidColor", get_SolidColor, null); 13 | L.RegVar("Depth", get_Depth, null); 14 | L.RegVar("Nothing", get_Nothing, null); 15 | L.RegFunction("IntToEnum", IntToEnum); 16 | L.EndEnum(); 17 | } 18 | 19 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 20 | static int get_Skybox(IntPtr L) 21 | { 22 | ToLua.Push(L, UnityEngine.CameraClearFlags.Skybox); 23 | return 1; 24 | } 25 | 26 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 27 | static int get_Color(IntPtr L) 28 | { 29 | ToLua.Push(L, UnityEngine.CameraClearFlags.Color); 30 | return 1; 31 | } 32 | 33 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 34 | static int get_SolidColor(IntPtr L) 35 | { 36 | ToLua.Push(L, UnityEngine.CameraClearFlags.SolidColor); 37 | return 1; 38 | } 39 | 40 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 41 | static int get_Depth(IntPtr L) 42 | { 43 | ToLua.Push(L, UnityEngine.CameraClearFlags.Depth); 44 | return 1; 45 | } 46 | 47 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 48 | static int get_Nothing(IntPtr L) 49 | { 50 | ToLua.Push(L, UnityEngine.CameraClearFlags.Nothing); 51 | return 1; 52 | } 53 | 54 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 55 | static int IntToEnum(IntPtr L) 56 | { 57 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 58 | UnityEngine.CameraClearFlags o = (UnityEngine.CameraClearFlags)arg0; 59 | ToLua.Push(L, o); 60 | return 1; 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/System_Collections_IEnumeratorWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class System_Collections_IEnumeratorWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(System.Collections.IEnumerator), null); 10 | L.RegFunction("MoveNext", MoveNext); 11 | L.RegFunction("Reset", Reset); 12 | L.RegVar("Current", get_Current, null); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int MoveNext(IntPtr L) 18 | { 19 | try 20 | { 21 | ToLua.CheckArgsCount(L, 1); 22 | System.Collections.IEnumerator obj = (System.Collections.IEnumerator)ToLua.CheckObject(L, 1, typeof(System.Collections.IEnumerator)); 23 | bool o = obj.MoveNext(); 24 | LuaDLL.lua_pushboolean(L, o); 25 | return 1; 26 | } 27 | catch(Exception e) 28 | { 29 | return LuaDLL.toluaL_exception(L, e); 30 | } 31 | } 32 | 33 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 34 | static int Reset(IntPtr L) 35 | { 36 | try 37 | { 38 | ToLua.CheckArgsCount(L, 1); 39 | System.Collections.IEnumerator obj = (System.Collections.IEnumerator)ToLua.CheckObject(L, 1, typeof(System.Collections.IEnumerator)); 40 | obj.Reset(); 41 | return 0; 42 | } 43 | catch(Exception e) 44 | { 45 | return LuaDLL.toluaL_exception(L, e); 46 | } 47 | } 48 | 49 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 50 | static int get_Current(IntPtr L) 51 | { 52 | object o = null; 53 | 54 | try 55 | { 56 | o = ToLua.ToObject(L, 1); 57 | System.Collections.IEnumerator obj = (System.Collections.IEnumerator)o; 58 | object ret = obj.Current; 59 | ToLua.Push(L, ret); 60 | return 1; 61 | } 62 | catch(Exception e) 63 | { 64 | return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Current on a nil value" : e.Message); 65 | } 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/BaseType/LuaInterface_EventObjectWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class LuaInterface_EventObjectWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(LuaInterface.EventObject), typeof(System.Object)); 10 | L.RegFunction("__add", op_Addition); 11 | L.RegFunction("__sub", op_Subtraction); 12 | L.RegFunction("__tostring", Lua_ToString); 13 | L.EndClass(); 14 | } 15 | 16 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 17 | static int op_Subtraction(IntPtr L) 18 | { 19 | try 20 | { 21 | LuaInterface.EventObject arg0 = (LuaInterface.EventObject)ToLua.CheckObject(L, 1, typeof(LuaInterface.EventObject)); 22 | arg0.func = ToLua.CheckLuaFunction(L, 2); 23 | arg0.op = EventOp.Sub; 24 | ToLua.Push(L, arg0); 25 | return 1; 26 | } 27 | catch (Exception e) 28 | { 29 | return LuaDLL.toluaL_exception(L, e); 30 | } 31 | } 32 | 33 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 34 | static int op_Addition(IntPtr L) 35 | { 36 | try 37 | { 38 | LuaInterface.EventObject arg0 = (LuaInterface.EventObject)ToLua.CheckObject(L, 1, typeof(LuaInterface.EventObject)); 39 | arg0.func = ToLua.CheckLuaFunction(L, 2); 40 | arg0.op = EventOp.Add; 41 | ToLua.Push(L, arg0); 42 | return 1; 43 | } 44 | catch (Exception e) 45 | { 46 | return LuaDLL.toluaL_exception(L, e); 47 | } 48 | } 49 | 50 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 51 | static int Lua_ToString(IntPtr L) 52 | { 53 | object obj = ToLua.ToObject(L, 1); 54 | 55 | if (obj != null) 56 | { 57 | LuaDLL.lua_pushstring(L, obj.ToString()); 58 | } 59 | else 60 | { 61 | LuaDLL.lua_pushnil(L); 62 | } 63 | 64 | return 1; 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_WrapModeWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_WrapModeWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginEnum(typeof(UnityEngine.WrapMode)); 10 | L.RegVar("Once", get_Once, null); 11 | L.RegVar("Loop", get_Loop, null); 12 | L.RegVar("PingPong", get_PingPong, null); 13 | L.RegVar("Default", get_Default, null); 14 | L.RegVar("ClampForever", get_ClampForever, null); 15 | L.RegVar("Clamp", get_Clamp, null); 16 | L.RegFunction("IntToEnum", IntToEnum); 17 | L.EndEnum(); 18 | } 19 | 20 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 21 | static int get_Once(IntPtr L) 22 | { 23 | ToLua.Push(L, UnityEngine.WrapMode.Once); 24 | return 1; 25 | } 26 | 27 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 28 | static int get_Loop(IntPtr L) 29 | { 30 | ToLua.Push(L, UnityEngine.WrapMode.Loop); 31 | return 1; 32 | } 33 | 34 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 35 | static int get_PingPong(IntPtr L) 36 | { 37 | ToLua.Push(L, UnityEngine.WrapMode.PingPong); 38 | return 1; 39 | } 40 | 41 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 42 | static int get_Default(IntPtr L) 43 | { 44 | ToLua.Push(L, UnityEngine.WrapMode.Default); 45 | return 1; 46 | } 47 | 48 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 49 | static int get_ClampForever(IntPtr L) 50 | { 51 | ToLua.Push(L, UnityEngine.WrapMode.ClampForever); 52 | return 1; 53 | } 54 | 55 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 56 | static int get_Clamp(IntPtr L) 57 | { 58 | ToLua.Push(L, UnityEngine.WrapMode.Clamp); 59 | return 1; 60 | } 61 | 62 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 63 | static int IntToEnum(IntPtr L) 64 | { 65 | int arg0 = (int)LuaDLL.lua_tonumber(L, 1); 66 | UnityEngine.WrapMode o = (UnityEngine.WrapMode)arg0; 67 | ToLua.Push(L, o); 68 | return 1; 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /Assets/ToLua/Plugins/tolua.bundle/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 16D32 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | tolua 11 | CFBundleIdentifier 12 | ameng.tolua 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | tolua 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | CFPlugInDynamicRegisterFunction 30 | 31 | CFPlugInDynamicRegistration 32 | NO 33 | CFPlugInFactories 34 | 35 | 00000000-0000-0000-0000-000000000000 36 | MyFactoryFunction 37 | 38 | CFPlugInTypes 39 | 40 | 00000000-0000-0000-0000-000000000000 41 | 42 | 00000000-0000-0000-0000-000000000000 43 | 44 | 45 | CFPlugInUnloadFunction 46 | 47 | DTCompiler 48 | com.apple.compilers.llvm.clang.1_0 49 | DTPlatformBuild 50 | 8C1002 51 | DTPlatformVersion 52 | GM 53 | DTSDKBuild 54 | 16C58 55 | DTSDKName 56 | macosx10.12 57 | DTXcode 58 | 0821 59 | DTXcodeBuild 60 | 8C1002 61 | NSHumanReadableCopyright 62 | Copyright © 2013 topameng. All rights reserved. 63 | 64 | 65 | -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_TrackedReferenceWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_TrackedReferenceWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(UnityEngine.TrackedReference), typeof(System.Object)); 10 | L.RegFunction("Equals", Equals); 11 | L.RegFunction("GetHashCode", GetHashCode); 12 | L.RegFunction("__eq", op_Equality); 13 | L.RegFunction("__tostring", ToLua.op_ToString); 14 | L.EndClass(); 15 | } 16 | 17 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 18 | static int op_Equality(IntPtr L) 19 | { 20 | try 21 | { 22 | ToLua.CheckArgsCount(L, 2); 23 | UnityEngine.TrackedReference arg0 = (UnityEngine.TrackedReference)ToLua.ToObject(L, 1); 24 | UnityEngine.TrackedReference arg1 = (UnityEngine.TrackedReference)ToLua.ToObject(L, 2); 25 | bool o = arg0 == arg1; 26 | LuaDLL.lua_pushboolean(L, o); 27 | return 1; 28 | } 29 | catch(Exception e) 30 | { 31 | return LuaDLL.toluaL_exception(L, e); 32 | } 33 | } 34 | 35 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 36 | static int Equals(IntPtr L) 37 | { 38 | try 39 | { 40 | ToLua.CheckArgsCount(L, 2); 41 | UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)ToLua.CheckObject(L, 1, typeof(UnityEngine.TrackedReference)); 42 | object arg0 = ToLua.ToVarObject(L, 2); 43 | bool o = obj != null ? obj.Equals(arg0) : arg0 == null; 44 | LuaDLL.lua_pushboolean(L, o); 45 | return 1; 46 | } 47 | catch(Exception e) 48 | { 49 | return LuaDLL.toluaL_exception(L, e); 50 | } 51 | } 52 | 53 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 54 | static int GetHashCode(IntPtr L) 55 | { 56 | try 57 | { 58 | ToLua.CheckArgsCount(L, 1); 59 | UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)ToLua.CheckObject(L, 1, typeof(UnityEngine.TrackedReference)); 60 | int o = obj.GetHashCode(); 61 | LuaDLL.lua_pushinteger(L, o); 62 | return 1; 63 | } 64 | catch(Exception e) 65 | { 66 | return LuaDLL.toluaL_exception(L, e); 67 | } 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/descriptor.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -------------------------------------------------------------------------------- 3 | -- FILE: descriptor.lua 4 | -- DESCRIPTION: protoc-gen-lua 5 | -- Google's Protocol Buffers project, ported to lua. 6 | -- https://code.google.com/p/protoc-gen-lua/ 7 | -- 8 | -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com 9 | -- All rights reserved. 10 | -- 11 | -- Use, modification and distribution are subject to the "New BSD License" 12 | -- as listed at . 13 | -- 14 | -- COMPANY: NetEase 15 | -- CREATED: 2010年08月11日 18时45分43秒 CST 16 | -------------------------------------------------------------------------------- 17 | -- 18 | 19 | module "protobuf.descriptor" 20 | 21 | FieldDescriptor = { 22 | TYPE_DOUBLE = 1, 23 | TYPE_FLOAT = 2, 24 | TYPE_INT64 = 3, 25 | TYPE_UINT64 = 4, 26 | TYPE_INT32 = 5, 27 | TYPE_FIXED64 = 6, 28 | TYPE_FIXED32 = 7, 29 | TYPE_BOOL = 8, 30 | TYPE_STRING = 9, 31 | TYPE_GROUP = 10, 32 | TYPE_MESSAGE = 11, 33 | TYPE_BYTES = 12, 34 | TYPE_UINT32 = 13, 35 | TYPE_ENUM = 14, 36 | TYPE_SFIXED32 = 15, 37 | TYPE_SFIXED64 = 16, 38 | TYPE_SINT32 = 17, 39 | TYPE_SINT64 = 18, 40 | MAX_TYPE = 18, 41 | 42 | -- Must be consistent with C++ FieldDescriptor::CppType enum in 43 | -- descriptor.h. 44 | -- 45 | CPPTYPE_INT32 = 1, 46 | CPPTYPE_INT64 = 2, 47 | CPPTYPE_UINT32 = 3, 48 | CPPTYPE_UINT64 = 4, 49 | CPPTYPE_DOUBLE = 5, 50 | CPPTYPE_FLOAT = 6, 51 | CPPTYPE_BOOL = 7, 52 | CPPTYPE_ENUM = 8, 53 | CPPTYPE_STRING = 9, 54 | CPPTYPE_MESSAGE = 10, 55 | MAX_CPPTYPE = 10, 56 | 57 | -- Must be consistent with C++ FieldDescriptor::Label enum in 58 | -- descriptor.h. 59 | -- 60 | LABEL_OPTIONAL = 1, 61 | LABEL_REQUIRED = 2, 62 | LABEL_REPEATED = 3, 63 | MAX_LABEL = 3 64 | } 65 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Core/LuaAttributes.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015-2016 topameng(topameng@qq.com) 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | */ 22 | using System; 23 | 24 | namespace LuaInterface 25 | { 26 | [AttributeUsage(AttributeTargets.Method)] 27 | public sealed class MonoPInvokeCallbackAttribute : Attribute 28 | { 29 | public MonoPInvokeCallbackAttribute(Type type) 30 | { 31 | } 32 | } 33 | 34 | public class NoToLuaAttribute : System.Attribute 35 | { 36 | public NoToLuaAttribute() 37 | { 38 | 39 | } 40 | } 41 | 42 | public class UseDefinedAttribute : System.Attribute 43 | { 44 | public UseDefinedAttribute() 45 | { 46 | 47 | } 48 | } 49 | 50 | public sealed class LuaByteBufferAttribute : Attribute 51 | { 52 | public LuaByteBufferAttribute() 53 | { 54 | } 55 | } 56 | 57 | [AttributeUsage(AttributeTargets.Method)] 58 | public sealed class LuaRenameAttribute : Attribute 59 | { 60 | public string Name; 61 | public LuaRenameAttribute() 62 | { 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Plane.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local setmetatable = setmetatable 7 | local Mathf = Mathf 8 | local Vector3 = Vector3 9 | 10 | local Plane = {} 11 | 12 | Plane.__index = function(t,k) 13 | return rawget(Plane, k) 14 | end 15 | 16 | Plane.__call = function(t,v) 17 | return Plane.New(v) 18 | end 19 | 20 | function Plane.New(normal, d) 21 | local plane = {} 22 | plane.normal = normal:Normalize() 23 | plane.distance = d 24 | setmetatable(plane, Plane) 25 | return plane 26 | end 27 | 28 | function Plane:Get() 29 | return self.normal, self.distance 30 | end 31 | 32 | function Plane:Raycast(ray) 33 | local a = Vector3.Dot(ray.direction, self.normal) 34 | local num2 = -Vector3.Dot(ray.origin, self.normal) - self.distance 35 | 36 | if Mathf.Approximately(a, 0) then 37 | return false, 0 38 | end 39 | 40 | local enter = num2 / a 41 | return enter > 0, enter 42 | end 43 | 44 | function Plane:SetNormalAndPosition(inNormal, inPoint) 45 | self.normal = inNormal:Normalize() 46 | self.distance = -Vector3.Dot(inNormal, inPoint) 47 | end 48 | 49 | function Plane:Set3Points(a, b, c) 50 | self.normal = Vector3.Normalize(Vector3.Cross(b - a, c - a)) 51 | self.distance = -Vector3.Dot(self.normal, a) 52 | end 53 | 54 | function Plane:GetDistanceToPoint(inPt) 55 | return Vector3.Dot(self.normal, inPt) + self.distance 56 | end 57 | 58 | function Plane:GetSide(inPt) 59 | return (Vector3.Dot(self.normal, inPt) + self.distance) > 0 60 | end 61 | 62 | function Plane:SameSide(inPt0, inPt1) 63 | local distanceToPoint = self:GetDistanceToPoint(inPt0) 64 | local num2 = self:GetDistanceToPoint(inPt1) 65 | return (distanceToPoint > 0 and num2 > 0) or (distanceToPoint <= 0 and num2 <= 0) 66 | end 67 | 68 | UnityEngine.Plane = Plane 69 | setmetatable(Plane, Plane) 70 | return Plane -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/RaycastHit.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local rawget = rawget 7 | local setmetatable = setmetatable 8 | 9 | RaycastBits = 10 | { 11 | Collider = 1, 12 | Normal = 2, 13 | Point = 4, 14 | Rigidbody = 8, 15 | Transform = 16, 16 | ALL = 31, 17 | } 18 | 19 | local RaycastBits = RaycastBits 20 | local RaycastHit = {} 21 | local get = tolua.initget(RaycastHit) 22 | 23 | RaycastHit.__index = function(t,k) 24 | local var = rawget(RaycastHit, k) 25 | 26 | if var == nil then 27 | var = rawget(get, k) 28 | 29 | if var ~= nil then 30 | return var(t) 31 | end 32 | end 33 | 34 | return var 35 | end 36 | 37 | --c# 创建 38 | function RaycastHit.New(collider, distance, normal, point, rigidbody, transform) 39 | local hit = {collider = collider, distance = distance, normal = normal, point = point, rigidbody = rigidbody, transform = transform} 40 | setmetatable(hit, RaycastHit) 41 | return hit 42 | end 43 | 44 | function RaycastHit:Init(collider, distance, normal, point, rigidbody, transform) 45 | self.collider = collider 46 | self.distance = distance 47 | self.normal = normal 48 | self.point = point 49 | self.rigidbody = rigidbody 50 | self.transform = transform 51 | end 52 | 53 | function RaycastHit:Get() 54 | return self.collider, self.distance, self.normal, self.point, self.rigidbody, self.transform 55 | end 56 | 57 | function RaycastHit:Destroy() 58 | self.collider = nil 59 | self.rigidbody = nil 60 | self.transform = nil 61 | end 62 | 63 | function RaycastHit.GetMask(...) 64 | local arg = {...} 65 | local value = 0 66 | 67 | for i = 1, #arg do 68 | local n = RaycastBits[arg[i]] or 0 69 | 70 | if n ~= 0 then 71 | value = value + n 72 | end 73 | end 74 | 75 | if value == 0 then value = RaycastBits["all"] end 76 | return value 77 | end 78 | 79 | UnityEngine.RaycastHit = RaycastHit 80 | setmetatable(RaycastHit, RaycastHit) 81 | return RaycastHit -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/UnityEngine/Touch.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com 3 | -- All rights reserved. 4 | -- Use, modification and distribution are subject to the "MIT License" 5 | -------------------------------------------------------------------------------- 6 | local zero = Vector2.zero 7 | local rawget = rawget 8 | local setmetatable = setmetatable 9 | 10 | TouchPhase = 11 | { 12 | Began = 0, 13 | Moved = 1, 14 | Stationary = 2, 15 | Ended = 3, 16 | Canceled = 4, 17 | } 18 | 19 | TouchBits = 20 | { 21 | DeltaPosition = 1, 22 | Position = 2, 23 | RawPosition = 4, 24 | ALL = 7, 25 | } 26 | 27 | local TouchPhase = TouchPhase 28 | local TouchBits = TouchBits 29 | local Touch = {} 30 | local get = tolua.initget(Touch) 31 | 32 | Touch.__index = function(t,k) 33 | local var = rawget(Touch, k) 34 | 35 | if var == nil then 36 | var = rawget(get, k) 37 | 38 | if var ~= nil then 39 | return var(t) 40 | end 41 | end 42 | 43 | return var 44 | end 45 | 46 | --c# 创建 47 | function Touch.New(fingerId, position, rawPosition, deltaPosition, deltaTime, tapCount, phase) 48 | local touch = {fingerId = fingerId or 0, position = position or zero, rawPosition = rawPosition or zero, deltaPosition = deltaPosition or zero, deltaTime = deltaTime or 0, tapCount = tapCount or 0, phase = phase or 0} 49 | setmetatable(touch, Touch) 50 | return touch 51 | end 52 | 53 | function Touch:Init(fingerId, position, rawPosition, deltaPosition, deltaTime, tapCount, phase) 54 | self.fingerId = fingerId 55 | self.position = position 56 | self.rawPosition = rawPosition 57 | self.deltaPosition = deltaPosition 58 | self.deltaTime = deltaTime 59 | self.tapCount = tapCount 60 | self.phase = phase 61 | end 62 | 63 | function Touch:Destroy() 64 | self.position = nil 65 | self.rawPosition = nil 66 | self.deltaPosition = nil 67 | end 68 | 69 | function Touch.GetMask(...) 70 | local arg = {...} 71 | local value = 0 72 | 73 | for i = 1, #arg do 74 | local n = TouchBits[arg[i]] or 0 75 | 76 | if n ~= 0 then 77 | value = value + n 78 | end 79 | end 80 | 81 | if value == 0 then value = TouchBits["all"] end 82 | 83 | return value 84 | end 85 | 86 | UnityEngine.TouchPhase = TouchPhase 87 | UnityEngine.Touch = Touch 88 | setmetatable(Touch, Touch) 89 | return Touch 90 | 91 | 92 | -------------------------------------------------------------------------------- /Assets/Scripts/ProcedureLaunch.cs: -------------------------------------------------------------------------------- 1 | using GameFramework.Event; 2 | using GameFramework.Procedure; 3 | using UnityEngine; 4 | using UnityGameFramework.Runtime; 5 | using ProcedureOwner = GameFramework.Fsm.IFsm; 6 | 7 | namespace Game 8 | { 9 | public class ProcedureLaunch : ProcedureBase 10 | { 11 | private bool m_HasStartedInitRes = false; 12 | private bool m_InitResComplete = false; 13 | 14 | protected override void OnInit(ProcedureOwner procedureOwner) 15 | { 16 | base.OnInit(procedureOwner); 17 | } 18 | 19 | protected override void OnEnter(ProcedureOwner procedureOwner) 20 | { 21 | base.OnEnter(procedureOwner); 22 | m_HasStartedInitRes = false; 23 | m_InitResComplete = false; 24 | } 25 | 26 | protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds) 27 | { 28 | base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); 29 | 30 | if (Application.isEditor && GameEntry.GetComponent().EditorResourceMode) 31 | { 32 | ChangeState(procedureOwner); 33 | return; 34 | } 35 | 36 | if (!m_HasStartedInitRes) 37 | { 38 | m_HasStartedInitRes = true; 39 | GameEntry.GetComponent().Subscribe(EventId.ResourceInitComplete, OnResourceInitComplete); 40 | GameEntry.GetComponent().InitResources(); 41 | } 42 | 43 | if (m_InitResComplete) 44 | { 45 | GameEntry.GetComponent().Unsubscribe(EventId.ResourceInitComplete, OnResourceInitComplete); 46 | ChangeState(procedureOwner); 47 | } 48 | } 49 | 50 | protected override void OnLeave(ProcedureOwner procedureOwner, bool isShutdown) 51 | { 52 | base.OnLeave(procedureOwner, isShutdown); 53 | } 54 | 55 | protected override void OnDestroy(ProcedureOwner procedureOwner) 56 | { 57 | base.OnDestroy(procedureOwner); 58 | } 59 | 60 | private void OnResourceInitComplete(object sender, GameEventArgs e) 61 | { 62 | m_InitResComplete = true; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_TierSettings_Tier1: 43 | renderingPath: 1 44 | useCascadedShadowMaps: 1 45 | m_TierSettings_Tier2: 46 | renderingPath: 1 47 | useCascadedShadowMaps: 1 48 | m_TierSettings_Tier3: 49 | renderingPath: 1 50 | useCascadedShadowMaps: 1 51 | m_DefaultRenderingPath: 1 52 | m_DefaultMobileRenderingPath: 1 53 | m_TierSettings: [] 54 | m_LightmapStripping: 0 55 | m_FogStripping: 0 56 | m_LightmapKeepPlain: 1 57 | m_LightmapKeepDirCombined: 1 58 | m_LightmapKeepDirSeparate: 1 59 | m_LightmapKeepDynamicPlain: 1 60 | m_LightmapKeepDynamicDirCombined: 1 61 | m_LightmapKeepDynamicDirSeparate: 1 62 | m_FogKeepLinear: 1 63 | m_FogKeepExp: 1 64 | m_FogKeepExp2: 1 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Integration of ToLua with Ellan Jiang's UnityGameFramework 2 | 3 | ## UnityGameFramework 4 | 5 | - URL: [UnityGameFramework](https://github.com/EllanJiang/UnityGameFramework) 6 | - Used as a submodule. 7 | 8 | ## ToLua 9 | 10 | - URL: [Tolua](https://github.com/topameng/tolua) 11 | 12 | - Commit: ea55728d57473bcf1a36e818f9e81bb1be0a0f25 13 | 14 | - Modifications: 15 | - Exclude LuaJit for now. 16 | - Remove the examples. 17 | - Copy Unity 5.x meta files to the right locations. 18 | - Change path constants in CustomSettings.cs and LuaConst.cs. (See comments like `// UGF`) 19 | - Add label 'LuaScript' for lua files so that they could be built into assetbundles. (Could be done by the editor script `AssetLabelEnsurer.cs`. 20 | 21 | ## Structure 22 | 23 | - Core functionality: `Assets/GameFrameworkExtensions/Lua/Scripts` 24 | - `LuaComponent` extends `GameFrameworkComponent` and provides features of loading and running Lua scripts. 25 | - `CustomLuaLoader` hacks ToLua's file reading mechanism so that asset bundles built by Game Framework will work. 26 | - Usage example: 27 | - `Assets/Scripts/ProcedureXXX.cs` 28 | - `Assets/LuaScripts/XXX.lua` 29 | - Editor helper scripts: `Assets/Scripts/Editor` 30 | 31 | ## How to play the example 32 | 33 | - Download this repo, initialize the submodule, and open it in Unity (5.3 or newer). 34 | - Create your own AssetBundleBuilder.xml file according to Game Framework examples, especially the output directory for asset bundles. 35 | - When assets are imported and source files are compiled, there will be a `Game` menu showing in the Unity editor. Select it and click `Build AssetBundles` to build lua scripts into asset bundles. 36 | - Copy all `Package` assetbundles of the platform on which you're going to run the project into `Assets/StreamingAssets/`. 37 | - Run the game in the editor or build and run the game on any platform. 38 | 39 | ## Notes 40 | 41 | - If you tick `Editor resource mode` on the `Base Component` of Game Framework, `CustomLuaLoader` reads the Lua files on the disk. Otherwise, the project, when launched, first loads the asset bundles that contain Lua scripts so that `CustomLuaLoader` gets the script contents later from the loaded (and hence cached) texts. 42 | 43 | - Currently `.lua` files will be recoginized by Unity as default assets, rather than text assets, so that you cannot load them directly from some asset bundle. So `AssetBundleBuilder.cs` add `.bytes` extension to the file names before building asset bundles and revert them afterwards. 44 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/containers.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -------------------------------------------------------------------------------- 3 | -- FILE: containers.lua 4 | -- DESCRIPTION: protoc-gen-lua 5 | -- Google's Protocol Buffers project, ported to lua. 6 | -- https://code.google.com/p/protoc-gen-lua/ 7 | -- 8 | -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com 9 | -- All rights reserved. 10 | -- 11 | -- Use, modification and distribution are subject to the "New BSD License" 12 | -- as listed at . 13 | -- 14 | -- COMPANY: NetEase 15 | -- CREATED: 2010年08月02日 16时15分42秒 CST 16 | -------------------------------------------------------------------------------- 17 | -- 18 | local setmetatable = setmetatable 19 | local table = table 20 | local rawset = rawset 21 | local error = error 22 | 23 | module "protobuf.containers" 24 | 25 | local _RCFC_meta = { 26 | add = function(self) 27 | local value = self._message_descriptor._concrete_class() 28 | local listener = self._listener 29 | rawset(self, #self + 1, value) 30 | value:_SetListener(listener) 31 | if listener.dirty == false then 32 | listener:Modified() 33 | end 34 | return value 35 | end, 36 | remove = function(self, key) 37 | local listener = self._listener 38 | table.remove(self, key) 39 | listener:Modified() 40 | end, 41 | __newindex = function(self, key, value) 42 | error("RepeatedCompositeFieldContainer Can't set value directly") 43 | end 44 | } 45 | _RCFC_meta.__index = _RCFC_meta 46 | 47 | function RepeatedCompositeFieldContainer(listener, message_descriptor) 48 | local o = { 49 | _listener = listener, 50 | _message_descriptor = message_descriptor 51 | } 52 | return setmetatable(o, _RCFC_meta) 53 | end 54 | 55 | local _RSFC_meta = { 56 | append = function(self, value) 57 | self._type_checker(value) 58 | rawset(self, #self + 1, value) 59 | self._listener:Modified() 60 | end, 61 | remove = function(self, key) 62 | table.remove(self, key) 63 | self._listener:Modified() 64 | end, 65 | __newindex = function(self, key, value) 66 | error("RepeatedCompositeFieldContainer Can't set value directly") 67 | end 68 | } 69 | _RSFC_meta.__index = _RSFC_meta 70 | 71 | function RepeatedScalarFieldContainer(listener, type_checker) 72 | local o = {} 73 | o._listener = listener 74 | o._type_checker = type_checker 75 | return setmetatable(o, _RSFC_meta) 76 | end 77 | 78 | 79 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/AssetBundleBuillder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Reflection; 5 | using UnityEditor; 6 | using UnityEngine; 7 | using UnityGameFramework.Runtime.Lua; 8 | 9 | namespace Game.Editor 10 | { 11 | /// 12 | /// 资源打包类。 13 | /// 14 | /// 封装 ,在打包前后给 Lua 脚本改名,以便它们能被识别为 15 | internal static class AssetBundleBuilder 16 | { 17 | [MenuItem("Game/Build AssetBundles")] 18 | private static void Run() 19 | { 20 | var luaPaths = AssetDatabase.FindAssets("l:" + EditorConst.LuaScriptAssetLabel).ToList().ConvertAll(guid => AssetDatabase.GUIDToAssetPath(guid)); 21 | var pathMap = ChangeFileNames(luaPaths); 22 | 23 | try 24 | { 25 | var buildAssetBundle = Assembly.GetExecutingAssembly().GetType("UnityGameFramework.Editor.AssetBundleTools.BuildAssetBundle") 26 | .GetMethod("Run", BindingFlags.NonPublic | BindingFlags.Static); 27 | buildAssetBundle.Invoke(null, null); 28 | } 29 | finally 30 | { 31 | RevertFileNames(pathMap); 32 | } 33 | } 34 | 35 | private static bool AssetIsLuaScript(string assetPath) 36 | { 37 | var obj = AssetDatabase.LoadAssetAtPath(assetPath, typeof(Object)); 38 | var labels = new HashSet(AssetDatabase.GetLabels(obj)); 39 | return labels.Contains(EditorConst.LuaScriptAssetLabel); 40 | } 41 | 42 | private static void RevertFileNames(IDictionary pathMap) 43 | { 44 | foreach (var kv in pathMap) 45 | { 46 | File.Move(kv.Key, kv.Value); 47 | } 48 | 49 | AssetDatabase.Refresh(); 50 | } 51 | 52 | private static IDictionary ChangeFileNames(IEnumerable luaPaths) 53 | { 54 | var pathMap = new Dictionary(); 55 | foreach (string path in luaPaths) 56 | { 57 | var newPath = path + LuaComponent.LuaAssetExtInBundle; 58 | File.Move(path, newPath); 59 | pathMap.Add(newPath, path); 60 | File.Move(path + ".meta", newPath + ".meta"); 61 | pathMap.Add(newPath + ".meta", path + ".meta"); 62 | } 63 | 64 | AssetDatabase.Refresh(); 65 | return pathMap; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/type_checkers.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -------------------------------------------------------------------------------- 3 | -- FILE: type_checkers.lua 4 | -- DESCRIPTION: protoc-gen-lua 5 | -- Google's Protocol Buffers project, ported to lua. 6 | -- https://code.google.com/p/protoc-gen-lua/ 7 | -- 8 | -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com 9 | -- All rights reserved. 10 | -- 11 | -- Use, modification and distribution are subject to the "New BSD License" 12 | -- as listed at . 13 | -- 14 | -- COMPANY: NetEase 15 | -- CREATED: 2010年07月29日 19时30分37秒 CST 16 | -------------------------------------------------------------------------------- 17 | -- 18 | 19 | local type = type 20 | local error = error 21 | local string = string 22 | 23 | module "protobuf.type_checkers" 24 | 25 | function TypeChecker(acceptable_types) 26 | local acceptable_types = acceptable_types 27 | 28 | return function(proposed_value) 29 | local t = type(proposed_value) 30 | if acceptable_types[type(proposed_value)] == nil then 31 | error(string.format('%s has type %s, but expected one of: %s', 32 | proposed_value, type(proposed_value), acceptable_types)) 33 | end 34 | end 35 | end 36 | 37 | function Int32ValueChecker() 38 | local _MIN = -2147483648 39 | local _MAX = 2147483647 40 | return function(proposed_value) 41 | if type(proposed_value) ~= 'number' then 42 | error(string.format('%s has type %s, but expected one of: number', 43 | proposed_value, type(proposed_value))) 44 | end 45 | if _MIN > proposed_value or proposed_value > _MAX then 46 | error('Value out of range: ' .. proposed_value) 47 | end 48 | end 49 | end 50 | 51 | function Uint32ValueChecker(IntValueChecker) 52 | local _MIN = 0 53 | local _MAX = 0xffffffff 54 | 55 | return function(proposed_value) 56 | if type(proposed_value) ~= 'number' then 57 | error(string.format('%s has type %s, but expected one of: number', 58 | proposed_value, type(proposed_value))) 59 | end 60 | if _MIN > proposed_value or proposed_value > _MAX then 61 | error('Value out of range: ' .. proposed_value) 62 | end 63 | end 64 | end 65 | 66 | function UnicodeValueChecker() 67 | return function (proposed_value) 68 | if type(proposed_value) ~= 'string' then 69 | error(string.format('%s has type %s, but expected one of: string', proposed_value, type(proposed_value))) 70 | end 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/protobuf/text_format.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -------------------------------------------------------------------------------- 3 | -- FILE: text_format.lua 4 | -- DESCRIPTION: protoc-gen-lua 5 | -- Google's Protocol Buffers project, ported to lua. 6 | -- https://code.google.com/p/protoc-gen-lua/ 7 | -- 8 | -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com 9 | -- All rights reserved. 10 | -- 11 | -- Use, modification and distribution are subject to the "New BSD License" 12 | -- as listed at . 13 | -- COMPANY: NetEase 14 | -- CREATED: 2010年08月05日 15时14分13秒 CST 15 | -------------------------------------------------------------------------------- 16 | -- 17 | local string = string 18 | local math = math 19 | local print = print 20 | local getmetatable = getmetatable 21 | local table = table 22 | local ipairs = ipairs 23 | local tostring = tostring 24 | 25 | local descriptor = require "protobuf.descriptor" 26 | 27 | module "protobuf.text_format" 28 | 29 | function format(buffer) 30 | local len = string.len( buffer ) 31 | for i = 1, len, 16 do 32 | local text = "" 33 | for j = i, math.min( i + 16 - 1, len ) do 34 | text = string.format( "%s %02x", text, string.byte( buffer, j ) ) 35 | end 36 | print( text ) 37 | end 38 | end 39 | 40 | local FieldDescriptor = descriptor.FieldDescriptor 41 | 42 | msg_format_indent = function(write, msg, indent) 43 | for field, value in msg:ListFields() do 44 | local print_field = function(field_value) 45 | local name = field.name 46 | write(string.rep(" ", indent)) 47 | if field.type == FieldDescriptor.TYPE_MESSAGE then 48 | local extensions = getmetatable(msg)._extensions_by_name 49 | if extensions[field.full_name] then 50 | write("[" .. name .. "] {\n") 51 | else 52 | write(name .. " {\n") 53 | end 54 | msg_format_indent(write, field_value, indent + 4) 55 | write(string.rep(" ", indent)) 56 | write("}\n") 57 | else 58 | write(string.format("%s: %s\n", name, tostring(field_value))) 59 | end 60 | end 61 | if field.label == FieldDescriptor.LABEL_REPEATED then 62 | for _, k in ipairs(value) do 63 | print_field(k) 64 | end 65 | else 66 | print_field(value) 67 | end 68 | end 69 | end 70 | 71 | function msg_format(msg) 72 | local out = {} 73 | local write = function(value) 74 | out[#out + 1] = value 75 | end 76 | msg_format_indent(write, msg, 0) 77 | return table.concat(out) 78 | end 79 | 80 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/mime.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- MIME support for the Lua language. 3 | -- Author: Diego Nehab 4 | -- Conforming to RFCs 2045-2049 5 | ----------------------------------------------------------------------------- 6 | 7 | ----------------------------------------------------------------------------- 8 | -- Declare module and import dependencies 9 | ----------------------------------------------------------------------------- 10 | local base = _G 11 | local ltn12 = require("ltn12") 12 | local mime = require("mime.core") 13 | local io = require("io") 14 | local string = require("string") 15 | local _M = mime 16 | 17 | -- encode, decode and wrap algorithm tables 18 | local encodet, decodet, wrapt = {},{},{} 19 | 20 | _M.encodet = encodet 21 | _M.decodet = decodet 22 | _M.wrapt = wrapt 23 | 24 | -- creates a function that chooses a filter by name from a given table 25 | local function choose(table) 26 | return function(name, opt1, opt2) 27 | if base.type(name) ~= "string" then 28 | name, opt1, opt2 = "default", name, opt1 29 | end 30 | local f = table[name or "nil"] 31 | if not f then 32 | base.error("unknown key (" .. base.tostring(name) .. ")", 3) 33 | else return f(opt1, opt2) end 34 | end 35 | end 36 | 37 | -- define the encoding filters 38 | encodet['base64'] = function() 39 | return ltn12.filter.cycle(_M.b64, "") 40 | end 41 | 42 | encodet['quoted-printable'] = function(mode) 43 | return ltn12.filter.cycle(_M.qp, "", 44 | (mode == "binary") and "=0D=0A" or "\r\n") 45 | end 46 | 47 | -- define the decoding filters 48 | decodet['base64'] = function() 49 | return ltn12.filter.cycle(_M.unb64, "") 50 | end 51 | 52 | decodet['quoted-printable'] = function() 53 | return ltn12.filter.cycle(_M.unqp, "") 54 | end 55 | 56 | local function format(chunk) 57 | if chunk then 58 | if chunk == "" then return "''" 59 | else return string.len(chunk) end 60 | else return "nil" end 61 | end 62 | 63 | -- define the line-wrap filters 64 | wrapt['text'] = function(length) 65 | length = length or 76 66 | return ltn12.filter.cycle(_M.wrp, length, length) 67 | end 68 | wrapt['base64'] = wrapt['text'] 69 | wrapt['default'] = wrapt['text'] 70 | 71 | wrapt['quoted-printable'] = function() 72 | return ltn12.filter.cycle(_M.qpwrp, 76, 76) 73 | end 74 | 75 | -- function that choose the encoding, decoding or wrap algorithm 76 | _M.encode = choose(encodet) 77 | _M.decode = choose(decodet) 78 | _M.wrap = choose(wrapt) 79 | 80 | -- define the end-of-line normalization filter 81 | function _M.normalize(marker) 82 | return ltn12.filter.cycle(_M.eol, 0, marker) 83 | end 84 | 85 | -- high level stuffing filter 86 | function _M.stuff() 87 | return ltn12.filter.cycle(_M.dot, 2) 88 | end 89 | 90 | return _M -------------------------------------------------------------------------------- /Assets/ToLua/Source/Generate/UnityEngine_MeshRendererWrap.cs: -------------------------------------------------------------------------------- 1 | //this source code was auto-generated by tolua#, do not modify it 2 | using System; 3 | using LuaInterface; 4 | 5 | public class UnityEngine_MeshRendererWrap 6 | { 7 | public static void Register(LuaState L) 8 | { 9 | L.BeginClass(typeof(UnityEngine.MeshRenderer), typeof(UnityEngine.Renderer)); 10 | L.RegFunction("New", _CreateUnityEngine_MeshRenderer); 11 | L.RegFunction("__eq", op_Equality); 12 | L.RegFunction("__tostring", ToLua.op_ToString); 13 | L.RegVar("additionalVertexStreams", get_additionalVertexStreams, set_additionalVertexStreams); 14 | L.EndClass(); 15 | } 16 | 17 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 18 | static int _CreateUnityEngine_MeshRenderer(IntPtr L) 19 | { 20 | try 21 | { 22 | int count = LuaDLL.lua_gettop(L); 23 | 24 | if (count == 0) 25 | { 26 | UnityEngine.MeshRenderer obj = new UnityEngine.MeshRenderer(); 27 | ToLua.Push(L, obj); 28 | return 1; 29 | } 30 | else 31 | { 32 | return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.MeshRenderer.New"); 33 | } 34 | } 35 | catch(Exception e) 36 | { 37 | return LuaDLL.toluaL_exception(L, e); 38 | } 39 | } 40 | 41 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 42 | static int op_Equality(IntPtr L) 43 | { 44 | try 45 | { 46 | ToLua.CheckArgsCount(L, 2); 47 | UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1); 48 | UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2); 49 | bool o = arg0 == arg1; 50 | LuaDLL.lua_pushboolean(L, o); 51 | return 1; 52 | } 53 | catch(Exception e) 54 | { 55 | return LuaDLL.toluaL_exception(L, e); 56 | } 57 | } 58 | 59 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 60 | static int get_additionalVertexStreams(IntPtr L) 61 | { 62 | object o = null; 63 | 64 | try 65 | { 66 | o = ToLua.ToObject(L, 1); 67 | UnityEngine.MeshRenderer obj = (UnityEngine.MeshRenderer)o; 68 | UnityEngine.Mesh ret = obj.additionalVertexStreams; 69 | ToLua.Push(L, ret); 70 | return 1; 71 | } 72 | catch(Exception e) 73 | { 74 | return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index additionalVertexStreams on a nil value" : e.Message); 75 | } 76 | } 77 | 78 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 79 | static int set_additionalVertexStreams(IntPtr L) 80 | { 81 | object o = null; 82 | 83 | try 84 | { 85 | o = ToLua.ToObject(L, 1); 86 | UnityEngine.MeshRenderer obj = (UnityEngine.MeshRenderer)o; 87 | UnityEngine.Mesh arg0 = (UnityEngine.Mesh)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Mesh)); 88 | obj.additionalVertexStreams = arg0; 89 | return 0; 90 | } 91 | catch(Exception e) 92 | { 93 | return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index additionalVertexStreams on a nil value" : e.Message); 94 | } 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Editor/Extend/ToLua_System_Enum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using LuaInterface; 3 | 4 | public class ToLua_System_Enum 5 | { 6 | public static string ToIntDefined = 7 | @" try 8 | { 9 | object arg0 = ToLua.CheckObject(L, 1, typeof(System.Enum)); 10 | int ret = Convert.ToInt32(arg0); 11 | LuaDLL.lua_pushinteger(L, ret); 12 | return 1; 13 | } 14 | catch (Exception e) 15 | { 16 | return LuaDLL.toluaL_exception(L, e); 17 | }"; 18 | 19 | public static string ParseDefined = 20 | @" try 21 | { 22 | int count = LuaDLL.lua_gettop(L); 23 | 24 | if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.Type), typeof(string))) 25 | { 26 | System.Type arg0 = (System.Type)ToLua.ToObject(L, 1); 27 | string arg1 = ToLua.ToString(L, 2); 28 | object o = System.Enum.Parse(arg0, arg1); 29 | ToLua.Push(L, (Enum)o); 30 | return 1; 31 | } 32 | else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(System.Type), typeof(string), typeof(bool))) 33 | { 34 | System.Type arg0 = (System.Type)ToLua.ToObject(L, 1); 35 | string arg1 = ToLua.ToString(L, 2); 36 | bool arg2 = LuaDLL.lua_toboolean(L, 3); 37 | object o = System.Enum.Parse(arg0, arg1, arg2); 38 | ToLua.Push(L, (Enum)o); 39 | return 1; 40 | } 41 | else 42 | { 43 | return LuaDLL.luaL_throw(L, ""invalid arguments to method: System.Enum.Parse""); 44 | } 45 | } 46 | catch(Exception e) 47 | { 48 | return LuaDLL.toluaL_exception(L, e); 49 | }"; 50 | 51 | public static string ToObjectDefined = 52 | @" try 53 | { 54 | int count = LuaDLL.lua_gettop(L); 55 | 56 | if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.Type), typeof(int))) 57 | { 58 | System.Type arg0 = (System.Type)ToLua.ToObject(L, 1); 59 | int arg1 = (int)LuaDLL.lua_tonumber(L, 2); 60 | object o = System.Enum.ToObject(arg0, arg1); 61 | ToLua.Push(L, (Enum)o); 62 | return 1; 63 | } 64 | else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.Type), typeof(object))) 65 | { 66 | System.Type arg0 = (System.Type)ToLua.ToObject(L, 1); 67 | object arg1 = ToLua.ToVarObject(L, 2); 68 | object o = System.Enum.ToObject(arg0, arg1); 69 | ToLua.Push(L, (Enum)o); 70 | return 1; 71 | } 72 | else 73 | { 74 | return LuaDLL.luaL_throw(L, ""invalid arguments to method: System.Enum.ToObject""); 75 | } 76 | } 77 | catch(Exception e) 78 | { 79 | return LuaDLL.toluaL_exception(L, e); 80 | }"; 81 | 82 | [UseDefinedAttribute] 83 | public static void ToInt(System.Enum obj) 84 | { 85 | } 86 | 87 | [UseDefinedAttribute] 88 | public static object ToObject(Type enumType, int value) 89 | { 90 | return null; 91 | } 92 | 93 | [UseDefinedAttribute] 94 | public static object Parse(Type enumType, string value) 95 | { 96 | return null; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Reflection/LuaConstructor.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015-2016 topameng(topameng@qq.com) 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | */ 22 | using System; 23 | using System.Collections.Generic; 24 | using System.Globalization; 25 | using System.Reflection; 26 | 27 | namespace LuaInterface 28 | { 29 | public class LuaConstructor 30 | { 31 | ConstructorInfo method = null; 32 | List list = null; 33 | 34 | [NoToLuaAttribute] 35 | public LuaConstructor(ConstructorInfo func, Type[] types) 36 | { 37 | method = func; 38 | 39 | if (types != null) 40 | { 41 | list = new List(types); 42 | } 43 | } 44 | 45 | public int Call(IntPtr L) 46 | { 47 | object[] args = null; 48 | ToLua.CheckArgsCount(L, list.Count + 1); 49 | 50 | if (list.Count > 0) 51 | { 52 | args = new object[list.Count]; 53 | 54 | for (int i = 0; i < list.Count; i++) 55 | { 56 | bool isRef = list[i].IsByRef; 57 | Type t0 = isRef ? list[i].GetElementType() : list[i]; 58 | object o = ToLua.CheckVarObject(L, i + 2, t0); 59 | args[i] = TypeChecker.ChangeType(o, t0); 60 | } 61 | } 62 | 63 | object ret = method.Invoke(args); 64 | int count = 1; 65 | ToLua.Push(L, ret); 66 | 67 | for (int i = 0; i < list.Count; i++) 68 | { 69 | if (list[i].IsByRef) 70 | { 71 | ++count; 72 | ToLua.Push(L, args[i]); 73 | } 74 | } 75 | 76 | return count; 77 | } 78 | 79 | public void Destroy() 80 | { 81 | method = null; 82 | list.Clear(); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Assets/ToLua/ToLua/Lua/socket/mbox.lua: -------------------------------------------------------------------------------- 1 | local _M = {} 2 | 3 | if module then 4 | mbox = _M 5 | end 6 | 7 | function _M.split_message(message_s) 8 | local message = {} 9 | message_s = string.gsub(message_s, "\r\n", "\n") 10 | string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end) 11 | string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end) 12 | if not message.body then 13 | string.gsub(message_s, "^\n(.*)", function (b) message.body = b end) 14 | end 15 | if not message.headers and not message.body then 16 | message.headers = message_s 17 | end 18 | return message.headers or "", message.body or "" 19 | end 20 | 21 | function _M.split_headers(headers_s) 22 | local headers = {} 23 | headers_s = string.gsub(headers_s, "\r\n", "\n") 24 | headers_s = string.gsub(headers_s, "\n[ ]+", " ") 25 | string.gsub("\n" .. headers_s, "\n([^\n]+)", function (h) table.insert(headers, h) end) 26 | return headers 27 | end 28 | 29 | function _M.parse_header(header_s) 30 | header_s = string.gsub(header_s, "\n[ ]+", " ") 31 | header_s = string.gsub(header_s, "\n+", "") 32 | local _, __, name, value = string.find(header_s, "([^%s:]-):%s*(.*)") 33 | return name, value 34 | end 35 | 36 | function _M.parse_headers(headers_s) 37 | local headers_t = _M.split_headers(headers_s) 38 | local headers = {} 39 | for i = 1, #headers_t do 40 | local name, value = _M.parse_header(headers_t[i]) 41 | if name then 42 | name = string.lower(name) 43 | if headers[name] then 44 | headers[name] = headers[name] .. ", " .. value 45 | else headers[name] = value end 46 | end 47 | end 48 | return headers 49 | end 50 | 51 | function _M.parse_from(from) 52 | local _, __, name, address = string.find(from, "^%s*(.-)%s*%<(.-)%>") 53 | if not address then 54 | _, __, address = string.find(from, "%s*(.+)%s*") 55 | end 56 | name = name or "" 57 | address = address or "" 58 | if name == "" then name = address end 59 | name = string.gsub(name, '"', "") 60 | return name, address 61 | end 62 | 63 | function _M.split_mbox(mbox_s) 64 | local mbox = {} 65 | mbox_s = string.gsub(mbox_s, "\r\n", "\n") .."\n\nFrom \n" 66 | local nj, i, j = 1, 1, 1 67 | while 1 do 68 | i, nj = string.find(mbox_s, "\n\nFrom .-\n", j) 69 | if not i then break end 70 | local message = string.sub(mbox_s, j, i-1) 71 | table.insert(mbox, message) 72 | j = nj+1 73 | end 74 | return mbox 75 | end 76 | 77 | function _M.parse(mbox_s) 78 | local mbox = _M.split_mbox(mbox_s) 79 | for i = 1, #mbox do 80 | mbox[i] = _M.parse_message(mbox[i]) 81 | end 82 | return mbox 83 | end 84 | 85 | function _M.parse_message(message_s) 86 | local message = {} 87 | message.headers, message.body = _M.split_message(message_s) 88 | message.headers = _M.parse_headers(message.headers) 89 | return message 90 | end 91 | 92 | return _M 93 | --------------------------------------------------------------------------------