flip-flop
tech: flip-flip - does nothing, except toggle on collisions tech: NOR gate - when flip-flip is ON take 0 harm from collisions tech: NAND gate - when flip-flip is ON do 55.5% damage tech: transistor - when flip-flop is ON regen 22 energy/s, when OFF drain 3.1 energy /s tech: shift registers - set flip-flop to ON with a new level
This commit is contained in:
@@ -776,7 +776,14 @@ const simulation = {
|
||||
|
||||
//energy overfill
|
||||
if (m.energy > m.maxEnergy) m.energy = m.maxEnergy + (m.energy - m.maxEnergy) * tech.overfillDrain //every second energy above max energy loses 25%
|
||||
|
||||
if (tech.isFlipFlopEnergy) {
|
||||
if (tech.isFlipFlopOn) {
|
||||
m.energy += 0.22;
|
||||
} else {
|
||||
m.energy -= 0.031;
|
||||
if (m.energy < 0) m.energy = 0
|
||||
}
|
||||
}
|
||||
if (m.pos.y > simulation.fallHeight) { // if 4000px deep
|
||||
Matter.Body.setVelocity(player, {
|
||||
x: 0,
|
||||
|
||||
Reference in New Issue
Block a user