Update flipflop.js
This commit is contained in:
parent
3c3b20d33d
commit
82c897e70e
|
|
@ -17,7 +17,6 @@ elements.flipflop = {
|
||||||
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
|
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
|
||||||
if (pixel.cooldown > 0){
|
if (pixel.cooldown > 0){
|
||||||
pixel.cooldown--
|
pixel.cooldown--
|
||||||
console.log(pixel.cooldown)
|
|
||||||
}
|
}
|
||||||
Output.charge = 0
|
Output.charge = 0
|
||||||
if (pixel.powerstate == "true" && Input.charge > 0.2 && pixel.cooldown < 1) {
|
if (pixel.powerstate == "true" && Input.charge > 0.2 && pixel.cooldown < 1) {
|
||||||
|
|
@ -27,7 +26,7 @@ elements.flipflop = {
|
||||||
pixel.color = "#CF300D"
|
pixel.color = "#CF300D"
|
||||||
Output.charge = 0
|
Output.charge = 0
|
||||||
} else if (pixel.powerstate == "false" && Input.charge > 0.2 && pixel.cooldown < 1) {
|
} else if (pixel.powerstate == "false" && Input.charge > 0.2 && pixel.cooldown < 1) {
|
||||||
Input.chare = 0
|
Input.charge = 0
|
||||||
pixel.cooldown = 5
|
pixel.cooldown = 5
|
||||||
pixel.powerstate = "true"
|
pixel.powerstate = "true"
|
||||||
pixel.color = "#94CF0D"
|
pixel.color = "#94CF0D"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue