Fixed a couple bugs with the wizard.
This commit is contained in:
parent
7faa401177
commit
55fcad2cc3
1 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ module.exports = class WizardSprite extends IndieSprite
|
||||||
Takes into account whether the wizard is in transit or not, and the bobbing up and down.
|
Takes into account whether the wizard is in transit or not, and the bobbing up and down.
|
||||||
Eventually will also adjust based on where other wizards are.
|
Eventually will also adjust based on where other wizards are.
|
||||||
"""
|
"""
|
||||||
@targetPos = @targetSprite.thang.pos if @targetSprite
|
@targetPos = @targetSprite.thang.pos if @targetSprite?.thang
|
||||||
pos = _.clone(@targetPos)
|
pos = _.clone(@targetPos)
|
||||||
pos.z = @defaultPos().z + @getBobOffset()
|
pos.z = @defaultPos().z + @getBobOffset()
|
||||||
@adjustPositionToSideOfTarget(pos) if @targetSprite # be off to the side depending on placement in world
|
@adjustPositionToSideOfTarget(pos) if @targetSprite # be off to the side depending on placement in world
|
||||||
|
@ -213,7 +213,7 @@ module.exports = class WizardSprite extends IndieSprite
|
||||||
targetPos.y += @spriteYOffset
|
targetPos.y += @spriteYOffset
|
||||||
|
|
||||||
faceTarget: ->
|
faceTarget: ->
|
||||||
if @targetSprite
|
if @targetSprite?.thang
|
||||||
@pointToward(@targetSprite.thang.pos)
|
@pointToward(@targetSprite.thang.pos)
|
||||||
|
|
||||||
updateMarks: ->
|
updateMarks: ->
|
||||||
|
|
Reference in a new issue