more efficient particles

Former-commit-id: 56dad88ecd715ad6e357e33b903851a47a358dcd
Former-commit-id: c85c0b759a447c0461563d98156f59879fa95db2
This commit is contained in:
Song Minjae
2017-01-22 04:13:45 +09:00
parent 4acc797fee
commit 54b52b1b6e
22 changed files with 135 additions and 66 deletions

View File

@@ -4,21 +4,21 @@ import org.dyn4j.geometry.Vector2
import org.newdawn.slick.Image
/**
* Created by SKYHi14 on 2017-01-20.
* Created by minjaesong on 2017-01-20.
*/
class ParticleTestRain(posX: Double, posY: Double) : ParticleBase(ActorOrder.BEHIND, 6000) {
init {
image = Image("./assets/graphics/weathers/raindrop.tga")
val w = image.width.toDouble()
val h = image.height.toDouble()
body = Image("./assets/graphics/weathers/raindrop.tga")
val w = body.width.toDouble()
val h = body.height.toDouble()
hitbox.setFromWidthHeight(
posX - w.times(0.5),
posY - h.times(0.5),
w, h
)
velocity.y = 16.0
velocity.y = 10.0
}
}