mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 05:24:06 +09:00
more efficient particles
Former-commit-id: 56dad88ecd715ad6e357e33b903851a47a358dcd Former-commit-id: c85c0b759a447c0461563d98156f59879fa95db2
This commit is contained in:
@@ -79,15 +79,17 @@ object WeatherMixer {
|
||||
fun update(gc: GameContainer, delta: Int) {
|
||||
currentWeather = weatherList[WEATHER_GENERIC]!![0]
|
||||
|
||||
// test rain toggled by F2
|
||||
|
||||
// test rain toggled by F2
|
||||
if (KeyToggler.isOn(Key.F2)) {
|
||||
val playerPos = Terrarum.ingame.player.centrePosPoint
|
||||
val rainParticle = ParticleTestRain(
|
||||
playerPos.x + HQRNG().nextInt(Terrarum.WIDTH) - Terrarum.HALFW,
|
||||
playerPos.y - Terrarum.HALFH
|
||||
)
|
||||
Terrarum.ingame.addActor(rainParticle)
|
||||
kotlin.repeat(4) { // 4 seems good
|
||||
val rainParticle = ParticleTestRain(
|
||||
playerPos.x + HQRNG().nextInt(Terrarum.WIDTH) - Terrarum.HALFW,
|
||||
playerPos.y - Terrarum.HALFH
|
||||
)
|
||||
Terrarum.ingame.addParticle(rainParticle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user