更改近身攻击距离
This commit is contained in:
parent
225fa8ad1f
commit
47ee292697
@ -898,10 +898,10 @@ function BattleUnitComp:enterSkillAttackState()
|
||||
self:playAnimation(BattleConst.SPINE_ANIMATION_NAME.MOVE, true, false)
|
||||
self.positionX = self.baseObject:fastGetLocalPosition()
|
||||
if self.side == BattleConst.SIDE_ATK then
|
||||
self.targetX = BattleConst.UNIT_FRONT_POS_X
|
||||
self.targetX = - BattleConst.INIT_POS_X + skill:getMoveTypeParams()
|
||||
self.moveDirection = 1
|
||||
else
|
||||
self.targetX = -BattleConst.UNIT_FRONT_POS_X
|
||||
self.targetX = BattleConst.INIT_POS_X - skill:getMoveTypeParams()
|
||||
self.moveDirection = -1
|
||||
end
|
||||
else
|
||||
@ -1213,10 +1213,10 @@ function BattleUnitComp:enterNormalAttackState()
|
||||
self:playAnimation(BattleConst.SPINE_ANIMATION_NAME.MOVE, true, false)
|
||||
self.positionX = self.baseObject:fastGetLocalPosition()
|
||||
if self.side == BattleConst.SIDE_ATK then
|
||||
self.targetX = BattleConst.UNIT_FRONT_POS_X
|
||||
self.targetX = - BattleConst.INIT_POS_X + skill:getMoveTypeParams()
|
||||
self.moveDirection = 1
|
||||
else
|
||||
self.targetX = -BattleConst.UNIT_FRONT_POS_X
|
||||
self.targetX = BattleConst.INIT_POS_X - skill:getMoveTypeParams()
|
||||
self.moveDirection = -1
|
||||
end
|
||||
else
|
||||
|
||||
@ -177,7 +177,17 @@ function BattleSkillEntity:changeSkillId(skillId)
|
||||
end
|
||||
|
||||
function BattleSkillEntity:getMoveType()
|
||||
return self.skillInfo.skill_position
|
||||
if not self.skillInfo.skill_position then
|
||||
return
|
||||
end
|
||||
return self.skillInfo.skill_position[1]
|
||||
end
|
||||
|
||||
function BattleSkillEntity:getMoveTypeParams()
|
||||
if not self.skillInfo.skill_position then
|
||||
return 0
|
||||
end
|
||||
return self.skillInfo.skill_position[2] or 0
|
||||
end
|
||||
|
||||
function BattleSkillEntity:getSkillAttackName()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user