Dormany cyst item

This commit is contained in:
Anuken
2021-08-18 17:38:30 -04:00
parent f3cacb9e99
commit 130f32f3cd
7 changed files with 39 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
@Import float x, y;
@Import boolean added;
transient float accepting, updateTime, lastRipple = Time.time + Mathf.random(40f);
transient float accepting, updateTime, lastRipple = Time.time + Mathf.random(40f), effectTime = Mathf.random(50f);
float amount;
Tile tile;
Liquid liquid;
@@ -101,6 +101,14 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
updateTime = 40f;
}
if(!headless && liquid.particleEffect != Fx.none){
if((effectTime += Time.delta) >= liquid.particleSpacing){
float size = Mathf.clamp(amount / (maxLiquid / 1.5f)) * 4f;
liquid.particleEffect.at(x + Mathf.range(size), y + Mathf.range(size));
effectTime = 0f;
}
}
updateTime -= Time.delta;
}