logic flip

This commit is contained in:
Josh Deprez 2021-08-26 09:55:55 +10:00
parent e1274a7beb
commit 056f0cf5d5

View file

@ -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() }