示例#1
0
    private static int CastSkill(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 12);
            FightLogic fightLogic       = (FightLogic)ToLua.CheckObject(L, 1, typeof(FightLogic));
            GameObject go               = (GameObject)ToLua.CheckUnityObject(L, 2, typeof(GameObject));
            int        skillId          = (int)LuaDLL.luaL_checknumber(L, 3);
            int        skillType        = (int)LuaDLL.luaL_checknumber(L, 4);
            int        stamp            = (int)LuaDLL.luaL_checknumber(L, 5);
            string     folderName       = ToLua.CheckString(L, 6);
            string     prefabName       = ToLua.CheckString(L, 7);
            string     target_id        = ToLua.CheckString(L, 8);
            Vector3    targetPos        = ToLua.ToVector3(L, 9);
            bool       needneedFeedback = LuaDLL.luaL_checkboolean(L, 10);
            string[]   targetIds        = ToLua.CheckStringArray(L, 11);
            bool       isAct            = LuaDLL.luaL_checkboolean(L, 12);
            GameObject obj              = fightLogic.CastSkill(go, skillId, skillType, stamp, folderName, prefabName, target_id, targetPos, needneedFeedback, targetIds, isAct);
            ToLua.Push(L, obj);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }