code layout

This commit is contained in:
Josh Deprez 2021-09-02 17:15:34 +10:00
parent 20e0a24a42
commit ac39e393ba

View file

@ -70,7 +70,9 @@ func (aw *Awakeman) Update() error {
if ebiten.IsKeyPressed(ebiten.KeyShift) {
z = 2.0
}
aw.camera.PointAt(aw.Sprite.Actor.Pos.XY().Add(aw.Sprite.Actor.Size.XY().Div(2)), z)
pos := aw.Sprite.Actor.Pos.XY()
size := aw.Sprite.Actor.Size.XY()
aw.camera.PointAt(pos.Add(size.Div(2)), z)
return nil
}