Ejemplo n.º 1
0
        public static int OpenLib( ILuaState lua )
        {
            var define = new NameFuncPair[]
            {
                new NameFuncPair( "clear_assembly_list", FFI_ClearAssemblyList ),
                new NameFuncPair( "add_assembly", FFI_AddAssembly ),

                new NameFuncPair( "clear_using_list", FFI_ClearUsingList ),
                new NameFuncPair( "using", FFI_Using ),

                new NameFuncPair( "parse_signature", FFI_ParseSignature ),

                new NameFuncPair( "get_type", FFI_GetType ),
                new NameFuncPair( "get_constructor", FFI_GetConstructor ),
                new NameFuncPair( "get_static_method", FFI_GetStaticMethod ),
                new NameFuncPair( "get_method", FFI_GetMethod ),
                new NameFuncPair( "call_method", FFI_CallMethod ),

                new NameFuncPair( "get_field", FFI_GetField ),
                new NameFuncPair( "get_field_value", FFI_GetFieldValue ),
                new NameFuncPair( "set_field_value", FFI_SetFieldValue ),

                new NameFuncPair( "get_prop", FFI_GetProp ),
                new NameFuncPair( "get_static_prop", FFI_GetStaticProp ),
                new NameFuncPair( "get_prop_value", FFI_GetPropValue ),
                new NameFuncPair( "set_prop_value", FFI_SetPropValue ),

                // new NameFuncPair( "call_constructor", FFI_CallConstructor ),
            };

            lua.L_NewLib( define );
            return 1;
        }
Ejemplo n.º 2
0
		public static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
				new NameFuncPair( "byte", 		Str_Byte ),
				new NameFuncPair( "char", 		Str_Char ),
				new NameFuncPair( "dump", 		Str_Dump ),
				new NameFuncPair( "find", 		Str_Find ),
				new NameFuncPair( "format", 	Str_Format ),
				new NameFuncPair( "gmatch", 	Str_Gmatch ),
				new NameFuncPair( "gsub", 		Str_Gsub ),
				new NameFuncPair( "len", 		Str_Len ),
				new NameFuncPair( "lower", 		Str_Lower ),
				new NameFuncPair( "match", 		Str_Match ),
				new NameFuncPair( "rep", 		Str_Rep ),
				new NameFuncPair( "reverse", 	Str_Reverse ),
				new NameFuncPair( "sub", 		Str_Sub ),
				new NameFuncPair( "upper", 		Str_Upper ),
			};

			lua.L_NewLib( define );
			CreateMetaTable( lua );

			return 1;
		}
Ejemplo n.º 3
0
 public static int initLib(ILuaState luaState)
 {
     var define = new NameFuncPair[]
     {
         new NameFuncPair("testLuaCall", testLuaCall),
     };
     luaState.L_NewLib(define);
     return 1;
 }
Ejemplo n.º 4
0
		public static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
				new NameFuncPair( "traceback", 	DBG_Traceback	),
			};

			lua.L_NewLib( define );
			return 1;
		}
Ejemplo n.º 5
0
        public static int OpenLib( ILuaState lua )
        {
            NameFuncPair[] define = new NameFuncPair[]
            {
                new NameFuncPair("clock", 	OS_Clock),
            };

            lua.L_NewLib( define );
            return 1;
        }
Ejemplo n.º 6
0
		public static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
#if !UNITY_WEBPLAYER
				new NameFuncPair("clock", 	OS_Clock),
#endif
			};

			lua.L_NewLib( define );
			return 1;
		}
Ejemplo n.º 7
0
        public static int OpenLib( ILuaState lua )
        {
            NameFuncPair[] define = new NameFuncPair[]
            {
                new NameFuncPair( "create", 	CO_Create	),
                new NameFuncPair( "resume", 	CO_Resume	),
                new NameFuncPair( "running", 	CO_Running	),
                new NameFuncPair( "status", 	CO_Status	),
                new NameFuncPair( "wrap", 		CO_Wrap		),
                new NameFuncPair( "yield", 		CO_Yield	),
            };

            lua.L_NewLib( define );
            return 1;
        }
Ejemplo n.º 8
0
		public static int OpenLib( ILuaState lua )
		{
			var define = new NameFuncPair[]
			{
				new NameFuncPair( "encode", ENC_Encode ),
				new NameFuncPair( "decode", ENC_Decode ),
			};

			lua.L_NewLib( define );

			lua.PushString( ENC_UTF8 );
			lua.SetField( -2, "utf8" );

			return 1;
		}
Ejemplo n.º 9
0
		internal static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
				new NameFuncPair( "assert", 		LuaBaseLib.B_Assert ),
				new NameFuncPair( "collectgarbage", LuaBaseLib.B_CollectGarbage ),
				new NameFuncPair( "dofile", 		LuaBaseLib.B_DoFile ),
				new NameFuncPair( "error", 			LuaBaseLib.B_Error ),
				new NameFuncPair( "ipairs", 		LuaBaseLib.B_Ipairs ),
				new NameFuncPair( "loadfile", 		LuaBaseLib.B_LoadFile ),
				new NameFuncPair( "load", 			LuaBaseLib.B_Load ),
				new NameFuncPair( "loadstring", 	LuaBaseLib.B_Load ),
				new NameFuncPair( "next", 			LuaBaseLib.B_Next ),
				new NameFuncPair( "pairs", 			LuaBaseLib.B_Pairs ),
				new NameFuncPair( "pcall", 			LuaBaseLib.B_PCall ),
				new NameFuncPair( "print", 			LuaBaseLib.B_Print ),
				new NameFuncPair( "rawequal", 		LuaBaseLib.B_RawEqual ),
				new NameFuncPair( "rawlen", 		LuaBaseLib.B_RawLen ),
				new NameFuncPair( "rawget", 		LuaBaseLib.B_RawGet ),
				new NameFuncPair( "rawset", 		LuaBaseLib.B_RawSet ),
				new NameFuncPair( "select", 		LuaBaseLib.B_Select ),
				new NameFuncPair( "getmetatable", 	LuaBaseLib.B_GetMetaTable ),
				new NameFuncPair( "setmetatable", 	LuaBaseLib.B_SetMetaTable ),
				new NameFuncPair( "tonumber", 		LuaBaseLib.B_ToNumber ),
				new NameFuncPair( "tostring", 		LuaBaseLib.B_ToString ),
				new NameFuncPair( "type", 			LuaBaseLib.B_Type ),
				new NameFuncPair( "xpcall", 		LuaBaseLib.B_XPCall ),
			};

			// set global _G
			lua.PushGlobalTable();
			lua.PushGlobalTable();
			lua.SetField( -2, "_G" );

			// open lib into global lib
			lua.L_SetFuncs( define, 0 );
			// lua.RegisterGlobalFunc( "type", 	LuaBaseLib.B_Type );
			// lua.RegisterGlobalFunc( "pairs", 	LuaBaseLib.B_Pairs );
			// lua.RegisterGlobalFunc( "ipairs", 	LuaBaseLib.B_Ipairs );
			// lua.RegisterGlobalFunc( "print",	LuaBaseLib.B_Print );
			// lua.RegisterGlobalFunc( "tostring",	LuaBaseLib.B_ToString );

			lua.PushString( LuaDef.LUA_VERSION );
			lua.SetField( -2, "_VERSION" );

			return 1;
		}
Ejemplo n.º 10
0
		public static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
				new NameFuncPair( "abs",   		Math_Abs ),
				new NameFuncPair( "acos",  		Math_Acos ),
				new NameFuncPair( "asin",  		Math_Asin ),
				new NameFuncPair( "atan2", 		Math_Atan2 ),
				new NameFuncPair( "atan",  		Math_Atan ),
				new NameFuncPair( "ceil",  		Math_Ceil ),
				new NameFuncPair( "cosh",  		Math_Cosh ),
				new NameFuncPair( "cos",   		Math_Cos ),
				new NameFuncPair( "deg",   		Math_Deg ),
				new NameFuncPair( "exp",   		Math_Exp ),
				new NameFuncPair( "floor", 		Math_Floor ),
				new NameFuncPair( "fmod",  		Math_Fmod ),
				new NameFuncPair( "frexp", 		Math_Frexp ),
				new NameFuncPair( "ldexp", 		Math_Ldexp ),
				new NameFuncPair( "log10", 		Math_Log10 ),
				new NameFuncPair( "log",   		Math_Log ),
				new NameFuncPair( "max",   		Math_Max ),
				new NameFuncPair( "min",   		Math_Min ),
				new NameFuncPair( "modf",  		Math_Modf ),
				new NameFuncPair( "pow",   		Math_Pow ),
				new NameFuncPair( "rad",   		Math_Rad ),
				new NameFuncPair( "random",     Math_Random ),
				new NameFuncPair( "randomseed", Math_RandomSeed ),
				new NameFuncPair( "sinh", 		Math_Sinh ),
				new NameFuncPair( "sin",   		Math_Sin ),
				new NameFuncPair( "sqrt",  		Math_Sqrt ),
				new NameFuncPair( "tanh",   	Math_Tanh ),
				new NameFuncPair( "tan",   		Math_Tan ),
			};

			lua.L_NewLib( define );

			lua.PushNumber( Math.PI );
			lua.SetField( -2, "pi" );

			lua.PushNumber( Double.MaxValue );
			lua.SetField( -2, "huge" );

			RandObj = new Random();

			return 1;
		}
Ejemplo n.º 11
0
        //
        public static void LoadLibs(ILuaState lua)
        {
            int n = lua.GetTop();

            lua.NewTable();
            lua.PushValue(-1);
            lua.SetGlobal(KlassName);
            NameFuncPair[] mfuncs = new NameFuncPair[] {
                // static
                new NameFuncPair("current", L_lthread_current),
                new NameFuncPair("start", L_lthread_start),
                // instance
                new NameFuncPair("is_alive", L_lthread_is_alive),
            };
            lua.L_SetFuncs(mfuncs, 0);
            lua.SetTop(n);
        }
Ejemplo n.º 12
0
 public static void Register(ILuaState lua)
 {
     NameFuncPair[] mfuncs = new NameFuncPair[] {
         new NameFuncPair("load", L_load),
         new NameFuncPair("play", L_play),
         new NameFuncPair("set_mult_color", L_set_mult_color),
         new NameFuncPair("set_add_color", L_set_add_color),
         new NameFuncPair("set_lerp_color", L_set_lerp_color),
         new NameFuncPair("clear_color_adjustment", L_clear_color_adjustment),
         new NameFuncPair("set_fps", L_set_fps),
         new NameFuncPair("set_play_speed", L_set_play_speed),
         new NameFuncPair("set_frame_skip", L_set_frame_skip),
         new NameFuncPair("set_preferred_fps", L_set_preferred_fps),
     };
     register_class(lua, klassName, mfuncs);
     LuaGameObject.constructorHook += add_sprite_object;
 }
Ejemplo n.º 13
0
        public static int OpenLib(ILuaState lua)
        {
            var define = new NameFuncPair[] {
                new NameFuncPair("NumHelper", NumHelper),
                new NameFuncPair("NumProj", NumProj),
                new NameFuncPair("NumProjID", NumProjID),
                new NameFuncPair("IsHelper", IsHelper),
                new NameFuncPair("Parent", GetParent),
                new NameFuncPair("Ctrl", IsCtrl),
                new NameFuncPair("CanAttack", CanAttack),
                new NameFuncPair("CommandTest", CommandTest),
                new NameFuncPair("Facing", Facing),
                new NameFuncPair("MoveType", GetMoveType),
                new NameFuncPair("PhysicsType", GetPhysicsType),
                new NameFuncPair("JustOnGround", IsJustOnGround),
                new NameFuncPair("StateNo", GetStateNo),
                new NameFuncPair("StateTime", GetStateTime),
                new NameFuncPair("Anim", GetAnim),
                new NameFuncPair("AnimExist", IsAnimExist),
                new NameFuncPair("AnimTime", GetAnimTime),
                new NameFuncPair("AnimElem", GetAnimElem),
                new NameFuncPair("AnimElemTime", GetAnimElemTime),
                new NameFuncPair("LeftAnimTime", GetLeftAnimTime),
                new NameFuncPair("Vel", GetVel),
                new NameFuncPair("Pos", GetPos),
                new NameFuncPair("P2Dist", P2Dist),
                new NameFuncPair("P2MoveType", P2MoveType),
                new NameFuncPair("GetHitVar", GetHitVar),
                new NameFuncPair("HitPauseTime", HitPauseTime),
                new NameFuncPair("FrontEdgeDist", FrontStageDist),
                new NameFuncPair("BackEdgeDist", BackStageDist),
                new NameFuncPair("FrontStageDist", FrontStageDist),
                new NameFuncPair("BackStageDist", BackStageDist),
                new NameFuncPair("MoveContact", MoveContact),
                new NameFuncPair("MoveGuarded", MoveGuarded),
                new NameFuncPair("MoveHit", MoveHit),
                new NameFuncPair("Life", GetHP),
                new NameFuncPair("LifeMax", GetMaxHP),
                new NameFuncPair("Alive", IsAlive),
                new NameFuncPair("MatchNo", MatchNo),
                new NameFuncPair("RoundNo", RoundNo),
            };

            lua.L_NewLib(define);
            return(1);
        }
Ejemplo n.º 14
0
 //
 public static void Load(ILuaState lua)
 {
     NameFuncPair[] mfuncs = new NameFuncPair[] {
         // static
         new NameFuncPair("delete_all", L_delete_all),
         new NameFuncPair("delete_key", L_delete_key),
         new NameFuncPair("get_float", L_get_float),
         new NameFuncPair("get_int", L_get_int),
         new NameFuncPair("get_string", L_get_string),
         new NameFuncPair("has_key", L_has_key),
         new NameFuncPair("save", L_save),
         new NameFuncPair("set_float", L_set_float),
         new NameFuncPair("set_int", L_set_int),
         new NameFuncPair("set_string", L_set_string),
         // instance
     };
     register_class(lua, klassName, mfuncs);
 }
Ejemplo n.º 15
0
    public static int OpenLib(ILuaState lua)
    {
        var toollib = new NameFuncPair[]
        {
            new NameFuncPair("OpenNpcTalk", CL_OpenNPCTalk),
            new NameFuncPair("CloseNpcTalk", CL_CloseNPCTalk),
            new NameFuncPair("SetNpcTalkOption", CL_SetNPCTalkOption),
            new NameFuncPair("IsCompletedQuest", CL_IsCompletedQuest),
            new NameFuncPair("IsCanCompleted", CL_IsCanCompleteQuest),
            new NameFuncPair("IsCanAccepted", CL_IsCanAcceptQuest),

            new NameFuncPair("SetAcceptOption", CL_SetAcceptQuestOption),
            new NameFuncPair("SetCopleteOption", CL_SetCompleteQuestOption),
        };

        lua.L_NewLib(toollib);
        return(1);
    }
Ejemplo n.º 16
0
        public static int OpenLib(ILuaState lua)
        {
            NameFuncPair[] define = new NameFuncPair[]
            {
                new NameFuncPair("close", IO_Close),
                new NameFuncPair("flush", IO_Flush),
                new NameFuncPair("input", IO_Input),
                new NameFuncPair("lines", IO_Lines),
                new NameFuncPair("open", IO_Open),
                new NameFuncPair("output", IO_Output),
                new NameFuncPair("popen", IO_Popen),
                new NameFuncPair("read", IO_Read),
                new NameFuncPair("tmpfile", IO_Tmpfile),
                new NameFuncPair("type", IO_Type),
                new NameFuncPair("write", IO_Write),
            };

            lua.L_NewLib(define);
            return(1);
        }
Ejemplo n.º 17
0
        public static int OpenLib(ILuaState lua)
        {
            NameFuncPair[] define = new NameFuncPair[]
            {
                new NameFuncPair("arshift", LuaBitLib.B_ArithShift),
                new NameFuncPair("band", LuaBitLib.B_And),
                new NameFuncPair("bnot", LuaBitLib.B_Not),
                new NameFuncPair("bor", LuaBitLib.B_Or),
                new NameFuncPair("bxor", LuaBitLib.B_Xor),
                new NameFuncPair("btest", LuaBitLib.B_Test),
                new NameFuncPair("extract", LuaBitLib.B_Extract),
                new NameFuncPair("lrotate", LuaBitLib.B_LeftRotate),
                new NameFuncPair("lshift", LuaBitLib.B_LeftShift),
                new NameFuncPair("replace", LuaBitLib.B_Replace),
                new NameFuncPair("rrotate", LuaBitLib.B_RightRotate),
                new NameFuncPair("rshift", LuaBitLib.B_RightShift),
            };

            lua.L_NewLib(define);
            return(1);
        }
Ejemplo n.º 18
0
		public static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
				new NameFuncPair( "arshift", 	LuaBitLib.B_ArithShift ),
				new NameFuncPair( "band", 		LuaBitLib.B_And ),
				new NameFuncPair( "bnot", 		LuaBitLib.B_Not ),
				new NameFuncPair( "bor", 		LuaBitLib.B_Or ),
				new NameFuncPair( "bxor", 		LuaBitLib.B_Xor ),
				new NameFuncPair( "btest", 		LuaBitLib.B_Test ),
				new NameFuncPair( "extract", 	LuaBitLib.B_Extract ),
				new NameFuncPair( "lrotate", 	LuaBitLib.B_LeftRotate ),
				new NameFuncPair( "lshift", 	LuaBitLib.B_LeftShift ),
				new NameFuncPair( "replace", 	LuaBitLib.B_Replace ),
				new NameFuncPair( "rrotate", 	LuaBitLib.B_RightRotate ),
				new NameFuncPair( "rshift", 	LuaBitLib.B_RightShift ),
			};

			lua.L_NewLib( define );
			return 1;
		}
Ejemplo n.º 19
0
 public static void RegisterClass(ILuaState lua)
 {
     NameFuncPair[] mfuncs = new NameFuncPair[] {
         // static
         new NameFuncPair("blank", L_blank),
         new NameFuncPair("current", L_current),
         new NameFuncPair("find", L_find),
         new NameFuncPair("load", L_load),
         new NameFuncPair("instantiate", L_instantiate),
         new NameFuncPair("destroy", L_destroy),
         //
         new NameFuncPair("set_active", L_set_active),
         new NameFuncPair("get_name", L_get_name),
         new NameFuncPair("set_name", L_set_name),
         new NameFuncPair("get_parent", L_get_parent),
         new NameFuncPair("set_parent", L_set_parent),
         new NameFuncPair("kick", L_kick),
         //
         new NameFuncPair("e_load_texture", L_load_texture),
     };
     register_class(lua, klassName, mfuncs);
 }
Ejemplo n.º 20
0
 public static void RegisterClass(ILuaState lua)
 {
     NameFuncPair[] mfuncs = new NameFuncPair[] {
         //
         new NameFuncPair("get_size_delta", L_get_size_delta),
         new NameFuncPair("set_size_delta", L_set_size_delta),
         new NameFuncPair("get_pivot", L_get_pivot),
         new NameFuncPair("set_pivot", L_set_pivot),
         new NameFuncPair("get_anchored_position", L_get_anchored_position),
         new NameFuncPair("set_anchored_position", L_set_anchored_position),
         //new NameFuncPair("get_local_euler", L_get_local_euler),
         //new NameFuncPair("set_local_euler", L_set_local_euler),
         //new NameFuncPair("get_lossy_scale", L_get_lossy_scale),
         //new NameFuncPair("get_local_scale", L_get_local_scale),
         //new NameFuncPair("set_local_scale", L_set_local_scale),
         //new NameFuncPair("get_sibling_index", L_get_sibling_index),
         //new NameFuncPair("set_sibling_index", L_set_sibling_index),
         //new NameFuncPair("set_as_first_sibling", L_set_as_first_sibling),
         //new NameFuncPair("set_as_last_sibling", L_set_as_last_sibling),
         //new NameFuncPair("find", L_find),
     };
     register_class_derived(lua, klassName, mfuncs, superKlassName);
 }
Ejemplo n.º 21
0
 public static void RegisterClass(ILuaState lua)
 {
     NameFuncPair[] mfuncs = new NameFuncPair[] {
         //
         new NameFuncPair("get_position", L_get_position),
         new NameFuncPair("set_position", L_set_position),
         new NameFuncPair("get_local_position", L_get_local_position),
         new NameFuncPair("set_local_position", L_set_local_position),
         new NameFuncPair("get_euler", L_get_euler),
         new NameFuncPair("set_euler", L_set_euler),
         new NameFuncPair("get_local_euler", L_get_local_euler),
         new NameFuncPair("set_local_euler", L_set_local_euler),
         new NameFuncPair("get_lossy_scale", L_get_lossy_scale),
         new NameFuncPair("get_local_scale", L_get_local_scale),
         new NameFuncPair("set_local_scale", L_set_local_scale),
         new NameFuncPair("get_sibling_index", L_get_sibling_index),
         new NameFuncPair("set_sibling_index", L_set_sibling_index),
         new NameFuncPair("set_as_first_sibling", L_set_as_first_sibling),
         new NameFuncPair("set_as_last_sibling", L_set_as_last_sibling),
         new NameFuncPair("find", L_find),
     };
     register_class(lua, klassName, mfuncs);
 }
Ejemplo n.º 22
0
		public static int OpenLib( ILuaState lua )
		{
			NameFuncPair[] define = new NameFuncPair[]
			{
				new NameFuncPair( "concat", 	TBL_Concat 	),
				new NameFuncPair( "maxn", 		TBL_MaxN 	),
				new NameFuncPair( "insert", 	TBL_Insert 	),
				new NameFuncPair( "pack", 		TBL_Pack 	),
				new NameFuncPair( "unpack", 	TBL_Unpack 	),
				new NameFuncPair( "remove", 	TBL_Remove 	),
				new NameFuncPair( "sort", 		TBL_Sort 	),
			};

			lua.L_NewLib( define );

#if LUA_COMPAT_UNPACK
			// _G.unpack = table.unpack
			lua.GetField( -1, "unpack" );
			lua.SetGlobal( "unpack" );
#endif

			return 1;
		}
Ejemplo n.º 23
0
    public int OpenIOLib(ILuaState lua)
    {
        var define = new NameFuncPair[]         // структура, описывающая все доступные методы (интерфейс Lua -> C#)
        {
            new NameFuncPair("getBrightness", L_GetBrightness),
            new NameFuncPair("getXPos", L_GetXPos),
            new NameFuncPair("getYPos", L_GetYPos),
            new NameFuncPair("getZPos", L_GetZPos),
            new NameFuncPair("getPitch", L_GetPitch),
            new NameFuncPair("getYaw", L_GetYaw),
            new NameFuncPair("getRoll", L_GetRoll),
            new NameFuncPair("move", L_Move),
            new NameFuncPair("motorSpeed", L_MotorSpeed),
            new NameFuncPair("motorEncoder", L_MotorEnc),
            new NameFuncPair("motorEncoderReset", L_MotorEncReset),
            new NameFuncPair("motorTurn", L_MotorTurn),
            new NameFuncPair("getCSBr", L_CSBrightness),
            new NameFuncPair("cSColor", L_CSColor),
            new NameFuncPair("cSR", L_CSR),
            new NameFuncPair("cSG", L_CSG),
            new NameFuncPair("cSB", L_CSB),
            new NameFuncPair("getUSDist", L_USDistance),
            new NameFuncPair("setThrust", L_SetThrust),
            new NameFuncPair("toggleThruster", L_TgThrust),
            new NameFuncPair("toggleThruster", L_TgThrust),
            new NameFuncPair("setLight", L_SetLight),
            new NameFuncPair("setLightColor", L_SetLightColor),
            new NameFuncPair("setLightIntensity", L_SetLightIntensity),
            new NameFuncPair("toggleGrabber", L_ToggleGrabber),
            new NameFuncPair("paint", L_Paint),
            new NameFuncPair("servoX", L_ServoX),
            new NameFuncPair("servoY", L_ServoY),
        };

        lua.L_NewLib(define);
        return(1);
    }
Ejemplo n.º 24
0
    public static int InitGlobal(ILuaState luaState)
    {
        var define = new NameFuncPair[]
        {
            // IPosition
            new NameFuncPair("GetPos", IPosition_GetPosition),
            new NameFuncPair("SetPos", IPosition_SetPosition),
            new NameFuncPair("Angle", IPosition_Angle),
            new NameFuncPair("Distance", IPosition_Distance),
            // Math
            new NameFuncPair("sin", Math_Sin),
            new NameFuncPair("cos", Math_Cos),
            new NameFuncPair("tan", Math_Tan),
            new NameFuncPair("asin", Math_ASin),
            new NameFuncPair("acos", Math_ACos),
            new NameFuncPair("atan", Math_ATan),
            new NameFuncPair("int", Math_Int),
            new NameFuncPair("abs", Math_Abs),
            new NameFuncPair("sign", Math_Sign),
            new NameFuncPair("RandomInt", GetRandomInt),
            new NameFuncPair("RandomFloat", GetRandomFloat),
            new NameFuncPair("RandomSign", GetRandomSign),
            // Common
            new NameFuncPair("Wait", Wait),
            new NameFuncPair("SetDebugStageName", SetDebugStageName),
            new NameFuncPair("FinishStage", FinishStage),
            new NameFuncPair("ResetFPSTimer", ResetFPSTimer),
            // Bullet
            new NameFuncPair("CreateSimpleBulletById", CreateSimpleBulletById),
            new NameFuncPair("CreateCustomizedBullet", CreateCustomizedBullet),
            new NameFuncPair("CreateCustomizedLaser", CreateCustomizedLaser),
            new NameFuncPair("CreateCustomizedLinearLaser", CreateCustomizedLinearLaser),
            new NameFuncPair("CreateCustomizedCurveLaser", CreateCustomizedCurveLaser),
            // Enemy
            new NameFuncPair("CreateNormalEnemyById", CreateNormalEnemyById),
            new NameFuncPair("CreateCustomizedEnemy", CreateCustomizedEnemy),
            // Boss
            new NameFuncPair("CreateBoss", CreateBoss),
            new NameFuncPair("ShowBossInfo", ShowBossInfo),
            // SpellCard
            new NameFuncPair("SetSpellCardProperties", SetSpellCardProperties),
            new NameFuncPair("StartSpellCard", StartSpellCard),
            new NameFuncPair("WaitForSpellCardFinish", WaitForSpellCardFinish),
            // Collider
            new NameFuncPair("CreateCustomizedCollider", CreateCustomizedCollider),
            new NameFuncPair("CreateSimpleCollider", CreateObjectColliderByType),
            // Tools
            new NameFuncPair("DropItems", DropItems),
            new NameFuncPair("CreateChargeEffect", CreateChargeEffect),
            new NameFuncPair("CreateBurstEffect", CreateBurstEffect),
            new NameFuncPair("CreateShakeEffect", CreateShakeEffect),
            new NameFuncPair("CreateBossDeadEffect", CreateBossDeadEffect),
            new NameFuncPair("ShakeScreen", ShakeScreen),
            new NameFuncPair("StopShakeScreen", StopShakeScreen),
            // STGObject
            new NameFuncPair("CreateCustomizedSTGObject", CreateCustomizedSTGObject),
            // Unit
            new NameFuncPair("KillUnit", KillUnit),
            new NameFuncPair("DelUnit", DelUnit),
            // Audio
            new NameFuncPair("PlaySound", PlaySound),
            new NameFuncPair("PauseSound", PauseSound),
            new NameFuncPair("ResumeSound", ResumeSound),
            new NameFuncPair("StopSound", StopSound),
            new NameFuncPair("LoadSound", LoadSound),
            // Dialog
            new NameFuncPair("StartDialog", StartDialog),
            new NameFuncPair("CreateDialogCG", CreateDialogCG),
            new NameFuncPair("HighlightDialogCG", HighlightDialogCG),
            new NameFuncPair("FadeOutDialogCG", FadeOutDialogCG),
            new NameFuncPair("CreateDialogBox", CreateDialogBox),
            //Debug
            new NameFuncPair("PrintCurFrame", LogFrameSinceStageStart),
            new NameFuncPair("PrintSoundTime", PrintSoundTime),
            new NameFuncPair("SetSoundPlayTime", SetSoundPlayTime),
        };

        luaState.PushGlobalTable();
        luaState.L_SetFuncs(define, 0);
        return(1);
    }
Ejemplo n.º 25
0
    public static int Init(ILuaState luaState)
    {
        var define = new NameFuncPair[]
        {
            new NameFuncPair("SetBulletOrderInLayer", SetBulletOrderInLayer),
            // BulletBase
            new NameFuncPair("GetBulletId", GetBulletId),
            new NameFuncPair("GetBulletPara", GetBulletPara),
            new NameFuncPair("SetBulletPara", SetBulletPara),
            new NameFuncPair("GetBulletPos", GetBulletPos),
            new NameFuncPair("SetBulletPos", SetBulletPos),
            new NameFuncPair("SetBulletColor", SetBulletColor),
            new NameFuncPair("SetBulletColorWithAlpha", SetBulletColorWithAlpha),
            new NameFuncPair("SetBulletStyleById", SetBulletStyleById),
            new NameFuncPair("EliminateBullet", EliminateBullet),
            new NameFuncPair("SetBulletAlpha", SetBulletAlpha),
            new NameFuncPair("SetBulletDetectCollision", SetBulletDetectCollision),
            new NameFuncPair("SetBulletResistEliminatedFlag", SetBulletResistEliminatedFlag),
            new NameFuncPair("AddBulletTask", AddBulletTask),
            new NameFuncPair("GetBulletCollisionDetectParas", GetBulletCollisionDetectParas),
            // SimpleBullet
            new NameFuncPair("CreateSimpleBulletById", CreateSimpleBulletById),
            new NameFuncPair("CreateCustomizedBullet", CreateCustomizedBullet2),
            new NameFuncPair("SetBulletSelfRotation", SetBulletSelfRotation),
            new NameFuncPair("SetBulletScale", SetBulletScale),
            new NameFuncPair("BulletDoScale", BulletDoScale),
            new NameFuncPair("SetBulletAppearEffectAvailable", SetBulletAppearEffectAvailable),
            new NameFuncPair("SetBulletCurvePara", SetBulletCurvePara),
            new NameFuncPair("DoBulletAcceleration", DoBulletAcceleration),
            new NameFuncPair("DoBulletAccelerationWithLimitation", DoBulletAccelerationWithLimitation),

            new NameFuncPair("CreateNormalEnemyById", CreateNormalEnemyById),
            new NameFuncPair("CreateCustomizedEnemy", CreateCustomizedEnemy2),
            new NameFuncPair("HitEnemy", HitEnemy),
            new NameFuncPair("SetEnemyResistEliminateFlag", SetEnemyResistEliminateFlag),
            new NameFuncPair("EliminateEnemy", EliminateEnemy),
            new NameFuncPair("RawEliminateEnemy", RawEliminateEnemy),
            new NameFuncPair("SetEnemyWanderRange", SetEnemyWanderRange),
            new NameFuncPair("SetEnemyWanderAmplitude", SetEnemyWanderAmplitude),
            new NameFuncPair("SetEnemyWanderMode", SetEnemyWanderMode),
            new NameFuncPair("EnemyDoWander", EnemyDoWander),
            new NameFuncPair("SetEnemyMaxHp", SetEnemyMaxHp),
            // Laser
            new NameFuncPair("CreateLaser", CreateLaser),
            new NameFuncPair("CreateCustomizedLaser", CreateCustomizedLaser),
            new NameFuncPair("SetLaserCollisionFactor", SetLaserCollisionFactor),
            new NameFuncPair("SetLaserProps", SetLaserProps),
            new NameFuncPair("SetLaserPos", SetLaserPos),
            new NameFuncPair("SetLaserAngle", SetLaserAngle),
            new NameFuncPair("SetLaserExistDuration", SetLaserExistDuration),
            new NameFuncPair("SetLaserSize", SetLaserSize),
            new NameFuncPair("SetLaserRotatePara", SetLaserRotatePara),
            new NameFuncPair("SetLaserRotateParaWithOmega", SetLaserRotateParaWithOmega),
            new NameFuncPair("ChangeLaserWidthTo", ChangeLaserWidthTo),
            new NameFuncPair("ChangeLaserLengthTo", ChangeLaserLengthTo),
            new NameFuncPair("ChangeLaserAlphaTo", ChangeLaserAlphaTo),
            new NameFuncPair("SetLaserGrazeDetectParas", SetLaserGrazeDetectParas),
            new NameFuncPair("SetLaserCollisionDetectParas", SetLaserCollisionDetectParas),
            // LinearLaser
            new NameFuncPair("CreateLinearLaser", CreateLinearLaser),
            new NameFuncPair("SetLinearLaserLength", SetLinearLaserLength),
            new NameFuncPair("SetLinearLaserHeadEnable", SetLinearLaserHeadEnable),
            new NameFuncPair("SetLinearLaserSourceEnable", SetLinearLaserSourceEnable),
            new NameFuncPair("CreateCustomizedLinearLaser", CreateCustomizedLinearLaser),

            // 曲线激光
            new NameFuncPair("CreateCurveLaser", CreateCurveLaser),
            new NameFuncPair("SetCurveLaserStraightParas", SetCurveLaserStraightParas),
            new NameFuncPair("DoCurveLaserAccelerationWithLimitation", DoCurveLaserAccelerationWithLimitation),
            new NameFuncPair("SetCurveLaserCurveParas", SetCurveLaserCurveParas),
            new NameFuncPair("CreateCustomizedCurveLaser", CreateCustomizedCurveLaser),
            new NameFuncPair("SetCurveLaserLength", SetCurveLaserLength),
            new NameFuncPair("SetCurveLaserWidth", SetCurveLaserWidth),
            // 敌机
            new NameFuncPair("AddEnemyTask", AddEnemyTask),
            new NameFuncPair("EnemyMoveTowards", EnemyMoveTowards),
            new NameFuncPair("EnemyAccMoveTowards", EnemyAccMoveTowards),
            new NameFuncPair("EnemyAccMoveTowardsWithLimitation", EnemyAccMoveTowardsWithLimitation),
            new NameFuncPair("EnemyMoveToPos", EnemyMoveToPos),
            new NameFuncPair("SetEnemyDropItems", SetEnemyDropItems),
            new NameFuncPair("DropItems", DropItems),
            new NameFuncPair("SetEnemyInteractive", SetEnemyInteractive),
            // Boss相关
            new NameFuncPair("CreateBoss", CreateBoss),
            new NameFuncPair("SetBossPos", SetBossPos),
            new NameFuncPair("SetBossAni", SetBossAni),
            new NameFuncPair("PlayBossAni", PlayBossAni),
            new NameFuncPair("SetEnemyCollisionParas", SetEnemyCollisionParas),
            new NameFuncPair("SetBossCurPhaseData", SetBossCurPhaseData),
            new NameFuncPair("GetBossSpellCardHpRate", GetBossSpellCardHpRate),
            new NameFuncPair("GetSpellCardTimeLeftRate", GetSpellCardTimeLeftRate),
            new NameFuncPair("SetBossInvincible", SetEnemyInvincible),
            new NameFuncPair("ShowBossBloodBar", ShowBossBloodBar),

            new NameFuncPair("StartSpellCard", StartSpellCard),
            new NameFuncPair("WaitForSpellCardFinish", WaitForSpellCardFinish),
            new NameFuncPair("SetSpellCardProperties", SetSpellCardProperties),
            // 特效
            new NameFuncPair("SetEffectToPos", SetEffectToPos),
            new NameFuncPair("SetEffectFinish", SetEffectFinish),
            new NameFuncPair("CreateSpriteEffect", CreateSpriteEffect),
            new NameFuncPair("CreateSpriteEffectWithProps", CreateSpriteEffectWithProps),
            new NameFuncPair("SetSpriteEffectSize", SetSpriteEffectSize),
            new NameFuncPair("SetSpriteEffectScale", SetSpriteEffectScale),
            new NameFuncPair("SetSpriteEffectColor", SetSpriteEffectColor),
            new NameFuncPair("SpriteEffectScaleWidth", SpriteEffectChangeWidthTo),
            new NameFuncPair("SpriteEffectScaleHeight", SpriteEffectChangeHeightTo),
            new NameFuncPair("CreateChargeEffect", CreateChargeEffect),
            // 子弹组件
            new NameFuncPair("AddBulletComponent", AddBulletComponent),
            new NameFuncPair("AddBulletParaChangeEvent", AddBulletParaChangeEvent),
            new NameFuncPair("AddBulletColliderTriggerEvent", AddBulletColliderTriggerEvent),
            // ObjectCollider
            new NameFuncPair("CreateObjectColliderByType", CreateObjectColliderByType),
            new NameFuncPair("SetObjectColliderTag", SetObjectColliderTag),
            new NameFuncPair("SetObjectColliderToPos", SetObjectColliderToPos),
            new NameFuncPair("SetObjectColliderSize", SetObjectColliderSize),
            new NameFuncPair("SetObjectColliderColliderGroup", SetObjectColliderColliderGroup),
            new NameFuncPair("SetObjectColliderExistDuration", SetObjectColliderExistDuration),
            new NameFuncPair("ObjectColliderScaleToSize", ObjectColliderScaleToSize),
            new NameFuncPair("ObjectColliderClearSelf", ObjectColliderClearSelf),
            new NameFuncPair("SetObjectColliderEliminateType", SetObjectColliderEliminateType),
            new NameFuncPair("SetObjectColliderHitEnemyDamage", SetObjectColliderHitEnemyDamage),
            new NameFuncPair("RemoveObjectColliderByTag", RemoveObjectColliderByTag),

            new NameFuncPair("CreateGravitationFieldByType", CreateGravitationFieldByType),
            new NameFuncPair("InitGravitationField", InitGravitationField),
            new NameFuncPair("RemoveGravitationFieldByTag", RemoveGravitationFieldByTag),
            // 清理子弹
            new NameFuncPair("ClearEnemyBulletsInRange", ClearEnemyBulletsInRange),
            new NameFuncPair("ClearAllEnemyBullets", ClearAllEnemyBullets),
            // 背景相关
            new NameFuncPair("CreateBgSpriteObject", CreateBgSpriteObject),
            new NameFuncPair("SetBgSprteObjectPos", SetBgSprteObjectPos),
            new NameFuncPair("SetBgSpriteObjectScale", SetBgSpriteObjectScale),
            new NameFuncPair("SetBgSpriteObjectVelocity", SetBgSpriteObjectVelocity),
            new NameFuncPair("SetBgSpriteObjectSelfRotateAngle", SetBgSpriteObjectSelfRotateAngle),
            new NameFuncPair("SetBgSpriteObjectRotation", SetBgSpriteObjectRotation),
            new NameFuncPair("BgSpriteObjectDoFade", BgSpriteObjectDoFade),
            new NameFuncPair("SetBgSpriteObjectAcce", SetBgSpriteObjectAcce),
            new NameFuncPair("SetBgSpriteObjectAcceWithLimitation", SetBgSpriteObjectAcceWithLimitation),
            // 绑定附加组件
            new NameFuncPair("AttatchToMaster", AttachToMaster),
            new NameFuncPair("SetAttachmentRelativePos", SetAttachmentRelativePos),
            //Player相关
            new NameFuncPair("GetPlayerPos", GetPlayerPos),
            new NameFuncPair("SetPlayerPos", SetPlayerPos),
            new NameFuncPair("GetPlayerIsMovable", GetPlayerIsMovable),
            new NameFuncPair("SetPlayerIsMovable", SetPlayerIsMovable),
            new NameFuncPair("SetStageIsEnableToShoot", SetStageIsEnableToShoot),
            // ISTGMovable
            new NameFuncPair("MoveTo", STGMovableMoveTo),
            new NameFuncPair("MoveTowards", STGMovableMoveTowards),
            new NameFuncPair("DoStraightMove", STGMovableDoStraightMove),
            new NameFuncPair("DoAcceleration", STGMovableDoAcceleration),
            new NameFuncPair("DoAccelerationWithLimitation", STGMovableDoAccelerationWithLimitation),
            new NameFuncPair("DoCurvedMove", STGMovableDoCurvedMove),
            // 音效
            new NameFuncPair("PlaySound", PlaySound),
            // 通用类相关
            new NameFuncPair("GetRandomInt", GetRandomInt),
            new NameFuncPair("GetRandomFloat", GetRandomFloat),
            new NameFuncPair("GetPosAfterRotate", GetPosAfterRotate),
            new NameFuncPair("GetAngleToPlayer", GetAngleToPlayer),
            new NameFuncPair("GetAimToPlayerAngle", GetAimToPlayerAngle),
            new NameFuncPair("LogLuaNumber", LogLuaNumber),
            new NameFuncPair("GetVectorLength", GetVectorLength),
            new NameFuncPair("SetGlobalVector2", SetGlobalVector2),
            new NameFuncPair("GetGlobalVector2", GetGlobalVector2),
            new NameFuncPair("SetGlobalFloat", SetGlobalFloat),
            new NameFuncPair("GetGlobalFloat", GetGlobalFloat),
            new NameFuncPair("SetGlobalUserData", SetGlobalUserData),
            new NameFuncPair("GetGlobalUserData", GetGlobalUserData),
            new NameFuncPair("RemoveGlobalUserData", RemoveGlobalUserData),
            new NameFuncPair("PlayCharacterCG", PlayCharacterCG),
            new NameFuncPair("LogFrameSinceStageStart", LogFrameSinceStageStart),
        };

        luaState.L_NewLib(define);
        return(1);
    }
Ejemplo n.º 26
0
 public static int initLib(ILuaState luaState)
 {
     var define = new NameFuncPair[]
     {
         new NameFuncPair("testLuaCall", testLuaCall),
         new NameFuncPair("createEffect",createEffect),
         new NameFuncPair("createBuff",createBuff),
         new NameFuncPair("addEffectToBuff",addEffectToBuff),
         new NameFuncPair("addBuffToUnit",addBuffToUnit),
         new NameFuncPair("applyDamage",applyDamage),
         new NameFuncPair("applyTranslate",applyTranslate),
         new NameFuncPair("showChessboardDialog", showChessboardDialog),
         new NameFuncPair("terrainTranslate", terrainTranslate)
     };
     luaState.L_NewLib(define);
     return 1;
 }
Ejemplo n.º 27
0
		public static int OpenLib( ILuaState lua )
		{
			// NameFuncPair[] define = new NameFuncPair[]
			// {
			// 	new NameFuncPair( "module", PKG_Module ),
			// };

			// lua.L_NewLib( define );
			
			// // create table CLIBS to keep track of loaded C libraries
			// lua.L_GetSubTable( LuaDef.LUA_REGISTRYINDEX, CLIBS );
			// lua.CreateTable( 0, 1 ); // metatable for CLIBS
			// lua.PushCSharpFunction
			
			// create `package' table
			NameFuncPair[] pkg_define = new NameFuncPair[]
			{
				new NameFuncPair( "loadlib", 	PKG_LoadLib ),
				new NameFuncPair( "searchpath", PKG_SearchPath ),
				new NameFuncPair( "seeall", 	PKG_SeeAll ),
			};
			lua.L_NewLib( pkg_define );

			CreateSearchersTable( lua );
#if LUA_COMPAT_LOADERS
			lua.PushValue( -1 ); // make a copy of `searchers' table
			lua.SetField( -3, "loaders" ); // put it in field `loaders'
#endif
			lua.SetField( -2, "searchers" ); // put it in field `searchers'

			// set field `path'
			SetPath( lua, "path", LUA_PATHVERSION, LUA_PATH, LUA_PATH_DEFAULT );
			// set field `cpath'
			SetPath( lua, "cpath", LUA_CPATHVERSION, LUA_CPATH, LUA_CPATH_DEFAULT );

			// store config information
			lua.PushString( string.Format("{0}\n{1}\n{2}\n{3}\n{4}\n",
				LuaConf.LUA_DIRSEP,
				LUA_PATH_SEP,
				LUA_PATH_MARK,
				LUA_EXEC_DIR,
				LUA_IGMARK ) );
			lua.SetField( -2, "config" );

			// set field `loaded'
			lua.L_GetSubTable( LuaDef.LUA_REGISTRYINDEX, "_LOADED" );
			lua.SetField( -2, "loaded" );

			// set field `preload'
			lua.L_GetSubTable( LuaDef.LUA_REGISTRYINDEX, "_PRELOAD" );
			lua.SetField( -2, "preload" );

			lua.PushGlobalTable();
			lua.PushValue( -2 ); // set `package' as upvalue for next lib

			NameFuncPair[] loadLibFuncs = new NameFuncPair[]
			{
				new NameFuncPair( "module", 	LL_Module ),
				new NameFuncPair( "require", 	LL_Require ),
			};
			lua.L_SetFuncs( loadLibFuncs, 1 ); // open lib into global table
			lua.Pop( 1 ); // pop global table

			return 1; // return `package' table
		}
Ejemplo n.º 28
0
 public static int initLib(ILuaState luaState)
 {
     var define = new NameFuncPair[]
     {
         new NameFuncPair("setEffectCode", setEffectCode),
         new NameFuncPair("getEffectCode",getEffectCode),
         new NameFuncPair("setEffectCondition", setEffectCondition),
         new NameFuncPair("getEffectConditon",getEffectCondition),
         new NameFuncPair("setEffectCost", setEffectCost),
         new NameFuncPair("getEffectCost",getEffectCost),
         new NameFuncPair("setEffectTarget", setEffectTarget),
         new NameFuncPair("getEffectTarget",getEffectTarget),
         new NameFuncPair("setEffectOperation", setEffectOperation),
         new NameFuncPair("getEffectOperation",getEffectOperation),
         new NameFuncPair("getEventVO",getEventVO),
         new NameFuncPair("getEventVOProperty",getEventVOProperty),
         new NameFuncPair("getVOProperty",getVOProperty),
     };
     luaState.L_NewLib(define);
     return 1;
 }
Ejemplo n.º 29
0
 public void RegisterFunction(UniLua.NameFuncPair namefunc)
 {
     NameFuncPair[] namefuncs = new NameFuncPair[] { namefunc };
     RegisterFunctions(namefuncs);
 }
Ejemplo n.º 30
0
    /// <summary>
    /// Opens the lib. Regist lib functions for script.
    /// </summary>
    /// <returns>The lib.</returns>
    /// <param name="lua">Lua.</param>
    public static int OpenLib(ILuaState lua)
    {
        NameFuncPair[] define = new NameFuncPair[]
        {
            new NameFuncPair("LoadScript", LoadScript),
            new NameFuncPair("RegistEvent", RegistEvent),
            new NameFuncPair("PushSkillAffectIndex", PushSkillAffectIndex),
            new NameFuncPair("BanOperation", BanOperation),
            new NameFuncPair("BanSkill", BanSkill),
            new NameFuncPair("DoSkill", DoSkill),

            new NameFuncPair("PushBattleScene", PushBattleScene),
            new NameFuncPair("PushFBScene", PushFBScene),

            /************************************************************************/
            /*新手指引                                                               */
            /************************************************************************/
            new NameFuncPair("CreateGuide", CreateGuide),                       //创建指引(UI)
            new NameFuncPair("CreateGuideWithItemID", CreateGuideWithItemID),   //创建指引(道具id)
            new NameFuncPair("CreateGuideWithSkillID", CreateGuideWithSkillID), //创建指引(技能id)
            new NameFuncPair("CreateGuideInScene", CreateGuideInScene),         //创建指引(场景NPC)
            new NameFuncPair("CreateGuideInBattle", CreateGuideInBattle),       //创建指引(战斗中角色)
            new NameFuncPair("CreateGuideInMainScene", CreateGuideInMainScene), //创建指引(主城中的物体)
            new NameFuncPair("ClearGuide", ClearGuide),                         //清除指引
            new NameFuncPair("GuideIsFinish", GuideIsFinish),                   //判断指引完成
            new NameFuncPair("FinishGuide", FinishGuide),                       //设置指引完成
            /************************************************************************/
            /*新手指引                                                               */
            /************************************************************************/

            new NameFuncPair("BeginTalk", BeginTalk),                 //对话UI接口
            new NameFuncPair("CloseAllSubUI", CloseAllSubUI),         //关闭所有打开的子界面
            new NameFuncPair("GetBattleID", GetBattleID),             //获取战斗id
            new NameFuncPair("SetAutoBattle", SetAutoBattle),         //开关自动战斗
            new NameFuncPair("ShowBattleReward", ShowBattleReward),   //打开战斗结算界面
            new NameFuncPair("DisplayBottomBtns", DisplayBottomBtns), //打开最下排按钮
            new NameFuncPair("HideRenwuList", HideRenwuList),         //隐藏任务追踪面板
            new NameFuncPair("TalkedToNpc", TalkedToNpc),             //向服务器发送和哪个npc说了话

            /************************************************************************/
            /*获取玩家i属性                                                    */
            /************************************************************************/
            new NameFuncPair("GetIProp", GetIProp),

            /************************************************************************/
            /*需要LOADING提示的UI                                                    */
            /************************************************************************/
            new NameFuncPair("RegUI", RegistSlowerUI),

            /************************************************************************/
            /*获得宠物的特效和UI                                                     */
            /************************************************************************/
            new NameFuncPair("ShowGainBaby", ShowGainBabyEffect),

            /************************************************************************/
            /*强制显示摇杆                                                           */
            /************************************************************************/
            new NameFuncPair("DisplayStick", DisplayStick),

            /************************************************************************/
            /*弹出popText                                                           */
            /************************************************************************/
            new NameFuncPair("PopText", PopTextInterface),

            /************************************************************************/
            /*弹出MessageBox 接快捷购买                                              */
            /************************************************************************/
            new NameFuncPair("MessageBoxQuickUse", MessageBoxFastBuyInterface),

            /************************************************************************/
            /*传送的某个场景                                              */
            /************************************************************************/
            new NameFuncPair("TransforScene", TransforScene),


            new NameFuncPair("RegistzhizuoUI", RegistzhizuoUI),

            /************************************************************************/
            /*剧情开始                                              */
            /************************************************************************/
            new NameFuncPair("PlaySense", PlaySense),

            /************************************************************************/
            /*剧情结束                                              */
            /************************************************************************/
            new NameFuncPair("QuitSense", QuitSense),

            /************************************************************************/
            /*剧情对话                                              */
            /************************************************************************/
            new NameFuncPair("SenseTalk", SenseTalk),

            /************************************************************************/
            /*剧情继续                                              */
            /************************************************************************/
            new NameFuncPair("SenseNext", SenseNext),

            /************************************************************************/
            /*获取玩家或队伍的等级                                              */
            /************************************************************************/
            new NameFuncPair("PlayerLevel", PlayerLevel),
            new NameFuncPair("TeamMemberLevel", TeamMemberLevel),
            //是否有队员暂离
            new NameFuncPair("HasLeaveMember", HasLeaveMember),

            new NameFuncPair("ShowMsgBox", ShowMessageBox),

            //判断任务是否完成
            new NameFuncPair("IsQuestFinished", IsQuestFinished),

            //战斗中角色冒泡说话
            new NameFuncPair("BubbleTalk", BubbleTalk),

            //当前场景id
            new NameFuncPair("CurrentSceneID", CurrentSceneID),
        };

        lua.L_NewLib(define);

        L = lua;

        return(1);
    }