mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 21:14:04 +09:00
more efficient particles
Former-commit-id: 56dad88ecd715ad6e357e33b903851a47a358dcd Former-commit-id: c85c0b759a447c0461563d98156f59879fa95db2
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user