bigger torch flame sprite; basic physics on particles

This commit is contained in:
minjaesong
2021-08-17 20:51:25 +09:00
parent a2b3334692
commit 9a271b1b9e
6 changed files with 24 additions and 19 deletions

View File

@@ -61,7 +61,7 @@ internal class FixtureTikiTorch(nameFun: () -> String) : FixtureBase(BlockBox(Bl
}
private var nextDelay = 0.4f
private var nextDelay = 0.25f
private var spawnTimer = 0f
override fun update(delta: Float) {
@@ -70,11 +70,11 @@ internal class FixtureTikiTorch(nameFun: () -> String) : FixtureBase(BlockBox(Bl
if (spawnTimer >= nextDelay) {
(Terrarum.ingame as TerrarumIngame).addParticle(ParticleVanishingSprite(
CommonResourcePool.getAsTextureRegionPack("particles-tiki_smoke.tga"),
0.25f, hitbox.centeredX, hitbox.startY + 5, rng.nextInt(256)
0.25f, hitbox.centeredX, hitbox.startY + 5, rng.nextInt(256), false
))
spawnTimer -= nextDelay
nextDelay = rng.nextFloat() * 0.4f + 0.4f
nextDelay = rng.nextFloat() * 0.25f + 0.25f
sprite?.delays?.set(0, rng.nextFloat() * 0.4f + 0.1f)
}

View File

@@ -12,7 +12,7 @@ import net.torvald.terrarum.gameparticles.ParticleBase
/**
* Created by minjaesong on 2017-12-18.
*/
class ParticleMegaRain(posX: Double, posY: Double) : ParticleBase(Actor.RenderOrder.BEHIND, true, 3.2f) {
class ParticleMegaRain(posX: Double, posY: Double) : ParticleBase(Actor.RenderOrder.BEHIND, true, false, 3.2f) {
init {
body = MegaRainGovernor.get()

View File

@@ -9,7 +9,7 @@ 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) {
class ParticleTestRain(posX: Double, posY: Double) : ParticleBase(Actor.RenderOrder.BEHIND, true, false, 6f) {
init {
body = TextureRegion(Texture(ModMgr.getGdxFile("basegame", "weathers/raindrop.tga")))