Beispiel #1
0
 static void TestSkill()
 {
     Debug.InitLogger(new TestLogger());
     SkillModule.Skill skill = new SkillModule.Skill(null, 0, 1);
     skill.Cast();
     while (true)
     {
         skill.Update(0.1f);
     }
 }
    static int Cast(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                BattleSystem.SkillModule.Skill obj = (BattleSystem.SkillModule.Skill)ToLua.CheckObject <BattleSystem.SkillModule.Skill>(L, 1);
                obj.Cast();
                return(0);
            }
            else if (count == 2)
            {
                BattleSystem.SkillModule.Skill     obj  = (BattleSystem.SkillModule.Skill)ToLua.CheckObject <BattleSystem.SkillModule.Skill>(L, 1);
                BattleSystem.ObjectModule.UnitBase arg0 = (BattleSystem.ObjectModule.UnitBase)ToLua.CheckObject <BattleSystem.ObjectModule.UnitBase>(L, 2);
                obj.Cast(arg0);
                return(0);
            }
            else if (count == 3)
            {
                BattleSystem.SkillModule.Skill obj = (BattleSystem.SkillModule.Skill)ToLua.CheckObject <BattleSystem.SkillModule.Skill>(L, 1);
                float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                obj.Cast(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: BattleSystem.SkillModule.Skill.Cast"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }