---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by HUAFEI2.
--- DateTime: 2020/6/11 14:43
---

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

---@class LSkeletalMeshActor
LSkeletalMeshActor = LSkeletalMeshActor or class("LSkeletalMeshActor", LBaseSkeletalMeshActor, LActor);

function LSkeletalMeshActor:ctor(kActor)
    self.m_kSkeletalMeshActor = tolua.cast(kActor, "Core::ASkeletalMeshActor")
    LOG_I("LSkeletalMeshActor:ctor", self, kActor, self.m_name, self.m_kSkeletalMeshActor)
    self.m_partBinder = self.m_kSkeletalMeshActor:GetPartMeshBinder();
end

function LSkeletalMeshActor:dtor()
    print("LSkeletalMeshActor:dtor()");
    self.m_partBinder = nil;
end

---@param szMeshPath string
---@return boolean
function LSkeletalMeshActor:SetMeshRes(szMeshPath)
    return self.m_kSkeletalMeshActor:SetMeshRes(szMeshPath);
end

---@param nPartIdx number
---@param szMeshPath string
---@param szBindPoint string
---@return boolean
function LSkeletalMeshActor:BindActorPart(nPartIdx, szMeshPath, szBindPoint)
    return self.m_partBinder:BindPartMesh(nPartIdx, szMeshPath, szBindPoint);
end

---@param nPartIdx number
---@return boolean
function LSkeletalMeshActor:ExistPartMesh(nPartIdx)
    return self.m_partBinder:ExistPartMesh(nPartIdx);
end

---@param nPartIdx number
---@return boolean
function LSkeletalMeshActor:UnBindActorPart(nPartIdx)
    return self.m_partBinder:UnBindPartMesh(nPartIdx);
end

---@return boolean
function LSkeletalMeshActor:ClearActorPart()
    return self.m_partBinder:ClearPartMesh();
end

---@return boolean
function LSkeletalMeshActor:ChangeAnimState(state)
    return self.m_kSkeletalMeshActor:ChangeAnimState(state);
end

