Fixed log output in culling, updated demo.

This commit is contained in:
Marvin Blum
2016-05-07 11:34:01 +02:00
parent 80e5cb20f8
commit 1d974566de
3 changed files with 16 additions and 7 deletions

View File

@@ -26,7 +26,21 @@ func (g *Game) Setup() {
}
sprite := goga.NewSprite(tex)
goga.AddActor(sprite)
renderer, ok := goga.GetSystemByName("spriteRenderer").(*goga.SpriteRenderer)
if !ok {
panic("Could not find renderer")
}
renderer.Add(sprite.Actor, sprite.Pos2D, sprite.Tex)
culling, ok := goga.GetSystemByName("culling2d").(*goga.Culling2D)
if !ok {
panic("Could not find culling")
}
culling.Add(sprite.Actor, sprite.Pos2D)
}
func (g *Game) Update(delta float64) {}