-----------------------------------------------------------------------------
--脚本文件：wheeled_vehicle_actor_impl.lua
--功能设计：
--功能开发：page(pk)
--开发时间：2020/07/08 16:09:16
--脚本功能：载具相关脚本，pc端
--修改记录：2020/07/24 17:27:03 lichao7 add SetupVehicleComponent method
-----------------------------------------------------------------------------

local LBaseWheeledVehicleActor = ImportScript("ugc_common/script/core/actor/wheeled_vehicle_actor.lua").LBaseWheeledVehicleActor;
local LActor = ImportScript("ugc_common/script/pc/actor/actor_impl.lua").LActor;

---@class LWheeledVehicleActor
LWheeledVehicleActor = LWheeledVehicleActor or class("LWheeledVehicleActor", LBaseWheeledVehicleActor, LActor);

function LWheeledVehicleActor:ctor(kActor)
    self.m_kWheeledVehicleActor = tolua.cast(kActor, "Core::AWheeledVehicleActor")
    LOG_I("LWheeledVehicleActor:ctor", self, kActor, self.m_name, self.m_kStaticMeshActor)
end

function LWheeledVehicleActor:dtor()
    print("LWheeledVehicleActor:dtor()");
end

---@param szMeshPath string
---@return boolean
function LWheeledVehicleActor:SetupVehicle(strResPath)
    return self.m_kWheeledVehicleActor:SetupVehicle(strResPath);
end

---@return boolean
function LWheeledVehicleActor:BeginControl()
    return self.m_kWheeledVehicleActor:BeginControl();
end

---@return boolean
function LWheeledVehicleActor:EndControl()
    return self.m_kWheeledVehicleActor:EndControl();
end

---
--- Set vehicle wheel component asset.
---
--- @param strAsset string
--- @param nCompKey number
--- @return boolean
---
function LWheeledVehicleActor:SetupComponent(strAsset, nCompKey)
    return self.m_kWheeledVehicleActor:SetupVehicleComponent(strAsset, nCompKey);
end

---@param strLogicSocketName string
---@param mNewMatrix KMatrix
---@return boolean
function LWheeledVehicleActor:SetLogicSocketMatrix(strLogicSocketName, mNewMatrix)
    return self.m_kWheeledVehicleActor:SetLogicSocketMatrix(strLogicSocketName, mNewMatrix);
end