logic flip
This commit is contained in:
parent
e1274a7beb
commit
056f0cf5d5
1 changed files with 13 additions and 11 deletions
|
@ -87,7 +87,10 @@ func (c *Camera) Draw(screen *ebiten.Image, opts ebiten.DrawImageOptions) {
|
||||||
|
|
||||||
// Draw everything.
|
// Draw everything.
|
||||||
for _, i := range c.Scene.Scan() {
|
for _, i := range c.Scene.Scan() {
|
||||||
if d, ok := i.(Drawer); ok {
|
d, ok := i.(Drawer)
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
pf := 1.0
|
pf := 1.0
|
||||||
if s, ok := i.(ParallaxScaler); ok {
|
if s, ok := i.(ParallaxScaler); ok {
|
||||||
pf = s.ParallaxFactor()
|
pf = s.ParallaxFactor()
|
||||||
|
@ -100,7 +103,6 @@ func (c *Camera) Draw(screen *ebiten.Image, opts ebiten.DrawImageOptions) {
|
||||||
d.Draw(screen, opts)
|
d.Draw(screen, opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Update passes the call to c.Scene.
|
// Update passes the call to c.Scene.
|
||||||
func (c *Camera) Update() error { return c.Scene.Update() }
|
func (c *Camera) Update() error { return c.Scene.Update() }
|
||||||
|
|
Loading…
Reference in a new issue