Been playing around with things a bit, before adding new features.
I've always wanted to make a game which had really big text scrolling along in the background, probably influenced by Jeff Minter or someone I think.
So I added a new system to do just that:
class BigTextSystem(i:Float) : IntervalSystem(i) {
override fun updateInterval() {
if (MathUtils.random(1,100) < 25) {
engine.addEntity(Entity().apply {
add(PositionComponent(Assets.VIEWPORT_WIDTH, 500f))
add(MovementComponent(-850f, 0f))
var msg = Assets.SOME_TEXT.get(MathUtils.random(0, Assets.SOME_TEXT.size - 1))
add(TextComponent(msg).apply {
scale = 16.0f
colour = Color(223 / 255f, 113 / 255f, 38 / 255f, 0.75f)
front = false
})
add(BoundsCheckComponent(8000f))
})
}
}
}
Also I've just discovered Kotlin's 'apply' function, as you can probably tell...
Here's a screenshot (it looks better in motion)
