中级玩家
 
- 贡献度
- 1
- 金元
- 1450
- 积分
- 149
- 精华
- 0
- 注册时间
- 2013-8-6
|
本帖最后由 噩噩V噩噩 于 2014-4-8 20:22 编辑
易宁哥,我添加如下代码后报错了
麻烦您给看一下
local function onfinished(inst)
inst:Remove()
end
local function onequip(inst, owner)
inst.fire = SpawnPrefab( "campfirefire" )
local follower = inst.fire.entity:AddFollower()
follower:FollowSymbol( owner.GUID, "swap_object", 0, 0, 1 )
inst.fire.AnimState:SetMultColour(255/255,190/255,121/255,1)
inst.fire.Transform:SetScale(0.8, 0.8, 0.8)
inst.fire:RemoveComponent("heater")
inst.fire.persists = false
owner.AnimState:Show("ARM_carry")
owner.AnimState:Hide("ARM_normal")
end
local function onunequip(inst, owner)
inst.fire:Remove()
inst.fire = nil
owner.AnimState:Hide("ARM_carry")
owner.AnimState:Show("ARM_normal")
end
inst:AddComponent("equippable")
inst.components.equippable.equipstack = true
inst.components.equippable:SetOnEquip( onequip )
inst.components.equippable:SetOnUnequip( onunequip )
inst:AddComponent("lighter")
inst.components.lighter:SetOnFinished( onfinished )
inst.components.lighter:SetMaxUses(1)
inst.components.lighter:SetUses(1)
另外,麻烦易宁哥给解释下 owner.AnimState:OverrideSymbol("swap_object", "swap_spear" ,"swap_spear")中前后两个swap_spear分别对应什么?我在做动画的时候死活弄不出来装备时显示的动画。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|