vanishing particle test

This commit is contained in:
minjaesong
2021-08-17 15:31:00 +09:00
parent 74ae35e9a9
commit 42c09640d0
10 changed files with 121 additions and 15 deletions

View File

@@ -0,0 +1,27 @@
package net.torvald.terrarum.modulebasegame.gameparticles
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.TextureRegion
import net.torvald.terrarum.ModMgr
import net.torvald.terrarum.gameactors.Actor
import net.torvald.terrarum.gameparticles.ParticleBase
/**
* Created by minjaesong on 2017-01-20.
*/
class ParticleTestRain(posX: Double, posY: Double) : ParticleBase(Actor.RenderOrder.BEHIND, true, 6f) {
init {
body = TextureRegion(Texture(ModMgr.getGdxFile("basegame", "weathers/raindrop.tga")))
val w = body.regionWidth.toDouble()
val h = body.regionHeight.toDouble()
hitbox.setFromWidthHeight(
posX - w.times(0.5),
posY - h.times(0.5),
w, h
)
velocity.y = 10.0
}
}