Example #1
0
    private static int GetSkillTargetPos(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 4);
            int         tx             = (int)LuaDLL.luaL_checknumber(L, 1);
            int         ty             = (int)LuaDLL.luaL_checknumber(L, 2);
            string      axyz           = ToLua.CheckString(L, 3);
            SceneEntity obj            = (SceneEntity)ToLua.CheckUnityObject(L, 4, typeof(SceneEntity));
            Vector3     skillTargetPos = FightLogic.GetSkillTargetPos(tx, ty, axyz, obj);
            ToLua.Push(L, skillTargetPos);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }