mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 21:14:04 +09:00
actorwithbody splitted in favour of new particle type
Former-commit-id: 121bd069d0a9eeef60f5ecb085a11a93c4b4a84d Former-commit-id: 539b4b6916e808c01298190cf347e928f61fe62e
This commit is contained in:
24
src/net/torvald/terrarum/gameactors/ParticleTestRain.kt
Normal file
24
src/net/torvald/terrarum/gameactors/ParticleTestRain.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package net.torvald.terrarum.gameactors
|
||||
|
||||
import org.dyn4j.geometry.Vector2
|
||||
import org.newdawn.slick.Image
|
||||
|
||||
/**
|
||||
* Created by SKYHi14 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()
|
||||
hitbox.setFromWidthHeight(
|
||||
posX - w.times(0.5),
|
||||
posY - h.times(0.5),
|
||||
w, h
|
||||
)
|
||||
|
||||
velocity.y = 16.0
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user