Question:
I am making a KaboomJS game and while the bullets have no trouble moving up and right, they cannot move down or left at all. Why is this? What simple error do I have?
Repl link:
https://replit.com/@element1010/Battle?v=1#code/main.js
https://battle.element1010.repl.co
onUpdate("bullet", (b) => {
switch(b.direction) {
case "left":
b.move(-BULLET_SPEED, 0);
case "right":
b.move(BULLET_SPEED, 0);
case "down":
b.move(0, BULLET_SPEED);
case "up":
b.move(0, -BULLET_SPEED);
}
}