oakes / play-clj

A Clojure game library
The Unlicense
939 stars 73 forks source link

Combining :line and :filled shapes #20

Closed Misophistful closed 10 years ago

Misophistful commented 10 years ago

Is it possible to combine :line and :filled shapes in one shape entity?

I'd like to create a hexagon with a :line :polygon border and then use multiple :filled :triangles to create the fill. However, when I try and combine the two I get: "java.lang.IllegalArgumentException: No matching field found: filled for class com.badlogic.gdx.graphics.glutils.ShapeRenderer"

Do I need to keep the two types of shapes as separate entities, or am I just trying to combine them incorrectly?

oakes commented 10 years ago

You'll need to make separate shape entities, but you can combine them together using the new bundle entity, so you can essentially treat them as one entity.

Misophistful commented 10 years ago

bundle is exactly what I need, thanks!