mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
bigger torch flame sprite; basic physics on particles
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user