示例#1
0
    public static void Bind(LuaState L)
    {
        float t = Time.realtimeSinceStartup;

        L.BeginModule(null);
        LuaAndCMsgCenterWrap.Register(L);
        AssetRequesetMsgWrap.Register(L);
        AssetEventWrap.Register(L);
        AssetResponseMsgWrap.Register(L);
        LuaUIPanelWrap.Register(L);
        LuaUIBehaviourWrap.Register(L);
        UtilWrap.Register(L);
        SigninSqWrap.Register(L);
        LoginSqWrap.Register(L);
        ChooseRoleStrWrap.Register(L);
        SourcesLoadSqWrap.Register(L);
        ObjectsInfoWrap.Register(L);
        ShopWeaponWrap.Register(L);
        ShopWeaponItemWrap.Register(L);
        SkillsInfoWrap.Register(L);
        SkillItemWrap.Register(L);
        NNPPCCWrap.Register(L);
        UIBasesWrap.Register(L);
        L.BeginModule("LuaInterface");
        LuaInterface_DebuggerWrap.Register(L);
        L.EndModule();
        L.BeginModule("UnityEngine");
        UnityEngine_DebugWrap.Register(L);
        UnityEngine_ComponentWrap.Register(L);
        UnityEngine_TransformWrap.Register(L);
        UnityEngine_MaterialWrap.Register(L);
        UnityEngine_RigidbodyWrap.Register(L);
        UnityEngine_CameraWrap.Register(L);
        UnityEngine_AudioSourceWrap.Register(L);
        UnityEngine_BehaviourWrap.Register(L);
        UnityEngine_MonoBehaviourWrap.Register(L);
        UnityEngine_GameObjectWrap.Register(L);
        UnityEngine_TrackedReferenceWrap.Register(L);
        UnityEngine_ApplicationWrap.Register(L);
        UnityEngine_PhysicsWrap.Register(L);
        UnityEngine_ColliderWrap.Register(L);
        UnityEngine_TimeWrap.Register(L);
        UnityEngine_TextureWrap.Register(L);
        UnityEngine_Texture2DWrap.Register(L);
        UnityEngine_RectWrap.Register(L);
        UnityEngine_ShaderWrap.Register(L);
        UnityEngine_RendererWrap.Register(L);
        UnityEngine_WWWWrap.Register(L);
        UnityEngine_ScreenWrap.Register(L);
        UnityEngine_CameraClearFlagsWrap.Register(L);
        UnityEngine_AudioClipWrap.Register(L);
        UnityEngine_AssetBundleWrap.Register(L);
        UnityEngine_ParticleSystemWrap.Register(L);
        UnityEngine_AsyncOperationWrap.Register(L);
        UnityEngine_LightTypeWrap.Register(L);
        UnityEngine_SleepTimeoutWrap.Register(L);
        UnityEngine_AnimatorWrap.Register(L);
        UnityEngine_InputWrap.Register(L);
        UnityEngine_KeyCodeWrap.Register(L);
        UnityEngine_SkinnedMeshRendererWrap.Register(L);
        UnityEngine_SpaceWrap.Register(L);
        UnityEngine_MeshRendererWrap.Register(L);
        UnityEngine_ParticleEmitterWrap.Register(L);
        UnityEngine_ParticleRendererWrap.Register(L);
        UnityEngine_ParticleAnimatorWrap.Register(L);
        UnityEngine_BoxColliderWrap.Register(L);
        UnityEngine_MeshColliderWrap.Register(L);
        UnityEngine_SphereColliderWrap.Register(L);
        UnityEngine_CharacterControllerWrap.Register(L);
        UnityEngine_CapsuleColliderWrap.Register(L);
        UnityEngine_AnimationWrap.Register(L);
        UnityEngine_AnimationClipWrap.Register(L);
        UnityEngine_AnimationStateWrap.Register(L);
        UnityEngine_AnimationBlendModeWrap.Register(L);
        UnityEngine_QueueModeWrap.Register(L);
        UnityEngine_PlayModeWrap.Register(L);
        UnityEngine_WrapModeWrap.Register(L);
        UnityEngine_QualitySettingsWrap.Register(L);
        UnityEngine_RenderSettingsWrap.Register(L);
        UnityEngine_BlendWeightsWrap.Register(L);
        UnityEngine_RenderTextureWrap.Register(L);
        UnityEngine_FontWrap.Register(L);
        UnityEngine_AnimationCurveWrap.Register(L);
        UnityEngine_CanvasGroupWrap.Register(L);
        UnityEngine_GradientWrap.Register(L);
        UnityEngine_SkyboxWrap.Register(L);
        UnityEngine_TextMeshWrap.Register(L);
        UnityEngine_ResolutionWrap.Register(L);
        UnityEngine_CanvasWrap.Register(L);
        UnityEngine_RectTransformWrap.Register(L);
        UnityEngine_SpriteWrap.Register(L);
        UnityEngine_RectOffsetWrap.Register(L);
        UnityEngine_TextAssetWrap.Register(L);
        L.BeginModule("UI");
        UnityEngine_UI_RawImageWrap.Register(L);
        UnityEngine_UI_CanvasScalerWrap.Register(L);
        UnityEngine_UI_ButtonWrap.Register(L);
        UnityEngine_UI_ImageWrap.Register(L);
        UnityEngine_UI_SliderWrap.Register(L);
        UnityEngine_UI_SelectableWrap.Register(L);
        UnityEngine_UI_SpriteStateWrap.Register(L);
        UnityEngine_UI_TextWrap.Register(L);
        UnityEngine_UI_MaskableGraphicWrap.Register(L);
        UnityEngine_UI_GraphicWrap.Register(L);
        UnityEngine_UI_GridLayoutGroupWrap.Register(L);
        UnityEngine_UI_LayoutGroupWrap.Register(L);
        UnityEngine_UI_OutlineWrap.Register(L);
        UnityEngine_UI_ShadowWrap.Register(L);
        UnityEngine_UI_BaseMeshEffectWrap.Register(L);
        L.BeginModule("Button");
        UnityEngine_UI_Button_ButtonClickedEventWrap.Register(L);
        L.EndModule();
        L.BeginModule("MaskableGraphic");
        UnityEngine_UI_MaskableGraphic_CullStateChangedEventWrap.Register(L);
        L.EndModule();
        L.EndModule();
        L.BeginModule("Events");
        UnityEngine_Events_UnityEventBaseWrap.Register(L);
        UnityEngine_Events_UnityEventWrap.Register(L);
        UnityEngine_Events_UnityEvent_boolWrap.Register(L);
        L.RegFunction("UnityAction", UnityEngine_Events_UnityAction);
        L.RegFunction("UnityAction_bool", UnityEngine_Events_UnityAction_bool);
        L.RegFunction("UnityAction_UnityEngine_EventSystems_BaseEventData", UnityEngine_Events_UnityAction_UnityEngine_EventSystems_BaseEventData);
        L.RegFunction("UnityAction_float", UnityEngine_Events_UnityAction_float);
        L.RegFunction("UnityAction_string", UnityEngine_Events_UnityAction_string);
        L.EndModule();
        L.BeginModule("EventSystems");
        UnityEngine_EventSystems_PointerEventDataWrap.Register(L);
        UnityEngine_EventSystems_UIBehaviourWrap.Register(L);
        UnityEngine_EventSystems_BaseEventDataWrap.Register(L);
        UnityEngine_EventSystems_AbstractEventDataWrap.Register(L);
        L.EndModule();
        L.BeginModule("Camera");
        L.RegFunction("CameraCallback", UnityEngine_Camera_CameraCallback);
        L.EndModule();
        L.BeginModule("Application");
        L.RegFunction("LowMemoryCallback", UnityEngine_Application_LowMemoryCallback);
        L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback);
        L.RegFunction("LogCallback", UnityEngine_Application_LogCallback);
        L.EndModule();
        L.BeginModule("AudioClip");
        L.RegFunction("PCMReaderCallback", UnityEngine_AudioClip_PCMReaderCallback);
        L.RegFunction("PCMSetPositionCallback", UnityEngine_AudioClip_PCMSetPositionCallback);
        L.EndModule();
        L.BeginModule("Font");
        L.RegFunction("FontTextureRebuildCallback", UnityEngine_Font_FontTextureRebuildCallback);
        L.EndModule();
        L.BeginModule("Canvas");
        L.RegFunction("WillRenderCanvases", UnityEngine_Canvas_WillRenderCanvases);
        L.EndModule();
        L.BeginModule("RectTransform");
        L.RegFunction("ReapplyDrivenProperties", UnityEngine_RectTransform_ReapplyDrivenProperties);
        L.EndModule();
        L.EndModule();
        L.BeginModule("U3DEventFrame");
        U3DEventFrame_MsgBaseWrap.Register(L);
        U3DEventFrame_MonoBaseWrap.Register(L);
        U3DEventFrame_AssetManagerWrap.Register(L);
        U3DEventFrame_UIManagerWrap.Register(L);
        U3DEventFrame_MsgCenterWrap.Register(L);
        U3DEventFrame_ManagerBaseWrap.Register(L);
        U3DEventFrame_UIBaseWrap.Register(L);
        U3DEventFrame_NPCBaseWrap.Register(L);
        L.EndModule();
        L.BeginModule("System");
        L.RegFunction("Action", System_Action);
        L.RegFunction("Action_UnityEngine_Font", System_Action_UnityEngine_Font);
        L.EndModule();
        L.EndModule();
        Debugger.Log("Register lua type cost time: {0}", Time.realtimeSinceStartup - t);
    }
示例#2
0
    public static void Bind(IntPtr L, string type = null)
    {
        if (type == null || wrapList.Contains(type))
        {
            return;
        }
        wrapList.Add(type); type += "Wrap";
        switch (type)
        {
        case "AnimationBlendModeWrap": AnimationBlendModeWrap.Register(L); break;

        case "AnimationClipWrap": AnimationClipWrap.Register(L); break;

        case "AnimationStateWrap": AnimationStateWrap.Register(L); break;

        case "AnimationWrap": AnimationWrap.Register(L); break;

        case "AppConstWrap": AppConstWrap.Register(L); break;

        case "ApplicationWrap": ApplicationWrap.Register(L); break;

        case "ArrayListWrap": ArrayListWrap.Register(L); break;

        case "AssetBundleWrap": AssetBundleWrap.Register(L); break;

        case "AsyncOperationWrap": AsyncOperationWrap.Register(L); break;

        case "AudioClipWrap": AudioClipWrap.Register(L); break;

        case "AudioManagerWrap": AudioManagerWrap.Register(L); break;

        case "AudioSourceWrap": AudioSourceWrap.Register(L); break;

        case "BehaviourWrap": BehaviourWrap.Register(L); break;

        case "BlendWeightsWrap": BlendWeightsWrap.Register(L); break;

        case "BoxColliderWrap": BoxColliderWrap.Register(L); break;

        case "CameraClearFlagsWrap": CameraClearFlagsWrap.Register(L); break;

        case "CameraWrap": CameraWrap.Register(L); break;

        case "CharacterControllerWrap": CharacterControllerWrap.Register(L); break;

        case "ColliderWrap": ColliderWrap.Register(L); break;

        case "ComponentWrap": ComponentWrap.Register(L); break;

        case "DebuggerWrap": DebuggerWrap.Register(L); break;

        case "DelegateFactoryWrap": DelegateFactoryWrap.Register(L); break;

        case "DelegateWrap": DelegateWrap.Register(L); break;

        case "EnumWrap": EnumWrap.Register(L); break;

        case "EquipItemWrap": EquipItemWrap.Register(L); break;

        case "EventDelegateWrap": EventDelegateWrap.Register(L); break;

        case "GameMgrWrap": GameMgrWrap.Register(L); break;

        case "GameObjectWrap": GameObjectWrap.Register(L); break;

        case "IEnumeratorWrap": IEnumeratorWrap.Register(L); break;

        case "InputWrap": InputWrap.Register(L); break;

        case "KeyCodeWrap": KeyCodeWrap.Register(L); break;

        case "LightTypeWrap": LightTypeWrap.Register(L); break;

        case "LightWrap": LightWrap.Register(L); break;

        case "List_objectWrap": List_objectWrap.Register(L); break;

        case "LuaBehaviourWrap": LuaBehaviourWrap.Register(L); break;

        case "LuaEnumTypeWrap": LuaEnumTypeWrap.Register(L); break;

        case "MaterialWrap": MaterialWrap.Register(L); break;

        case "MeshColliderWrap": MeshColliderWrap.Register(L); break;

        case "MeshRendererWrap": MeshRendererWrap.Register(L); break;

        case "MonoBehaviourWrap": MonoBehaviourWrap.Register(L); break;

        case "MsgPackerWrap": MsgPackerWrap.Register(L); break;

        case "MsgProtocolWrap": MsgProtocolWrap.Register(L); break;

        case "MsgUnPackerWrap": MsgUnPackerWrap.Register(L); break;

        case "NetworkMgrWrap": NetworkMgrWrap.Register(L); break;

        case "ObjectWrap": ObjectWrap.Register(L); break;

        case "ParticleAnimatorWrap": ParticleAnimatorWrap.Register(L); break;

        case "ParticleEmitterWrap": ParticleEmitterWrap.Register(L); break;

        case "ParticleRendererWrap": ParticleRendererWrap.Register(L); break;

        case "ParticleSystemWrap": ParticleSystemWrap.Register(L); break;

        case "PhysicsWrap": PhysicsWrap.Register(L); break;

        case "PlayerMainCityCtrlWrap": PlayerMainCityCtrlWrap.Register(L); break;

        case "PlayerManagerWrap": PlayerManagerWrap.Register(L); break;

        case "PlayerWrap": PlayerWrap.Register(L); break;

        case "PlayModeWrap": PlayModeWrap.Register(L); break;

        case "QualitySettingsWrap": QualitySettingsWrap.Register(L); break;

        case "QueueModeWrap": QueueModeWrap.Register(L); break;

        case "RendererWrap": RendererWrap.Register(L); break;

        case "RenderSettingsWrap": RenderSettingsWrap.Register(L); break;

        case "RenderTextureWrap": RenderTextureWrap.Register(L); break;

        case "ResourceManagerWrap": ResourceManagerWrap.Register(L); break;

        case "RoleItemWrap": RoleItemWrap.Register(L); break;

        case "ScaleButtonWrap": ScaleButtonWrap.Register(L); break;

        case "ScreenWrap": ScreenWrap.Register(L); break;

        case "ServerItemWrap": ServerItemWrap.Register(L); break;

        case "SimpleFramework_LuaHelperWrap": SimpleFramework_LuaHelperWrap.Register(L); break;

        case "SimpleFramework_Manager_TimerManagerWrap": SimpleFramework_Manager_TimerManagerWrap.Register(L); break;

        case "SimpleFramework_UtilWrap": SimpleFramework_UtilWrap.Register(L); break;

        case "SimpleFramework_WrapGridWrap": SimpleFramework_WrapGridWrap.Register(L); break;

        case "SkillItemWrap": SkillItemWrap.Register(L); break;

        case "SkillMgrWrap": SkillMgrWrap.Register(L); break;

        case "SkinnedMeshRendererWrap": SkinnedMeshRendererWrap.Register(L); break;

        case "SleepTimeoutWrap": SleepTimeoutWrap.Register(L); break;

        case "SpaceWrap": SpaceWrap.Register(L); break;

        case "SphereColliderWrap": SphereColliderWrap.Register(L); break;

        case "stringWrap": stringWrap.Register(L); break;

        case "System_ObjectWrap": System_ObjectWrap.Register(L); break;

        case "TalkToNPCWrap": TalkToNPCWrap.Register(L); break;

        case "TestDelegateListenerWrap": TestDelegateListenerWrap.Register(L); break;

        case "TestEventListenerWrap": TestEventListenerWrap.Register(L); break;

        case "TestLuaDelegateWrap": TestLuaDelegateWrap.Register(L); break;

        case "TextureWrap": TextureWrap.Register(L); break;

        case "TimeWrap": TimeWrap.Register(L); break;

        case "TouchPhaseWrap": TouchPhaseWrap.Register(L); break;

        case "TrackedReferenceWrap": TrackedReferenceWrap.Register(L); break;

        case "TransformWrap": TransformWrap.Register(L); break;

        case "TypeWrap": TypeWrap.Register(L); break;

        case "UIButtonWrap": UIButtonWrap.Register(L); break;

        case "UIEventListenerWrap": UIEventListenerWrap.Register(L); break;

        case "UIGridWrap": UIGridWrap.Register(L); break;

        case "UILabelWrap": UILabelWrap.Register(L); break;

        case "UIPanelWrap": UIPanelWrap.Register(L); break;

        case "UIRectWrap": UIRectWrap.Register(L); break;

        case "UIToolsWrap": UIToolsWrap.Register(L); break;

        case "UITweener_StyleWrap": UITweener_StyleWrap.Register(L); break;

        case "UIWidgetContainerWrap": UIWidgetContainerWrap.Register(L); break;

        case "UIWidgetWrap": UIWidgetWrap.Register(L); break;

        case "WWWWrap": WWWWrap.Register(L); break;
        }
    }