local assets = 
{
    Asset("ANIM", "anim/yangliu.zip"),
}   

local function fn()
    local inst = CreateEntity()
    inst.entity:AddTransform()
    inst.entity:AddAnimState()
       
    inst.AnimState:SetBank("yangliu")
    inst.AnimState:SetBuild("yangliu")
	local r = math.random()
	    if r <= 0.2 then
    inst.AnimState:PlayAnimation("idlea")
	elseif r <= 0.4 then 
	inst.AnimState:PlayAnimation("idleb")
	elseif r <= 0.6 then 
	inst.AnimState:PlayAnimation("idlec")
	elseif r <= 0.8 then 
	inst.AnimState:PlayAnimation("idled")
	else
	inst.AnimState:PlayAnimation("idlee")
	end
    MakeInventoryPhysics(inst)
	inst.savetag = "spell"
	inst.targettag = "player"
	--inst:DoTaskInTime(0.001,searatk)	
	inst.Transform:SetScale(3,3,3)
	inst:DoTaskInTime(5,function()inst:Remove()end)
        
    return inst
end
return Prefab( "common/yangliu", fn, assets)

