fix prosperon layout

This commit is contained in:
2026-02-20 21:23:21 -06:00
parent e78faccab8
commit ff2e4bd578
44 changed files with 17 additions and 18 deletions

View File

@@ -23,7 +23,7 @@ for (i = 0; i < 100; i++) {
})
}
this.update = function(dt) {
var update = function(dt) {
// If left mouse is down, spawn some more bunnies:
var mouse = input.mousestate()
var i = 0;
@@ -54,6 +54,6 @@ this.update = function(dt) {
}
}
this.hud = function() {
var hud = function() {
draw.images(bunnyTex, bunnies)
}

View File

@@ -23,7 +23,7 @@ function resetBall() {
resetBall()
this.update = function(dt) {
var update = function(dt) {
// Move paddles: positive Y is up, so W/↑ means p.y += speed
if (input.keyboard.down('w')) p1.y += p1.speed*dt
if (input.keyboard.down('s')) p1.y -= p1.speed*dt
@@ -69,7 +69,7 @@ this.update = function(dt) {
if (l>config.width) { score1++; resetBall() }
}
this.hud = function() {
var hud = function() {
// Clear screen black
draw.rectangle({x:0, y:0, width:config.width, height:config.height}, [0,0,0,1])

View File

@@ -50,7 +50,7 @@ function wrap(pos) {
resetGame()
this.update = function(dt) {
var update = function(dt) {
if (gameState != "playing") return
moveTimer += dt
if (moveTimer < moveInterval) return
@@ -80,7 +80,7 @@ this.update = function(dt) {
else pop(snake)
}
this.hud = function() {
var hud = function() {
// Optional clear screen
draw.rectangle({x:0, y:0, width:config.width, height:config.height}, [0,0,0,1])
@@ -104,7 +104,7 @@ this.hud = function() {
// No immediate reversal
// "Up" means y=1, so going physically up on screen
this.inputs = {
var inputs = {
up: function() {
if (direction.y != -1) nextDirection = {x:0,y:1}
},
@@ -122,4 +122,4 @@ this.inputs = {
}
}
input.player[0].control(this)
//input.player[0].control()

View File

@@ -166,7 +166,7 @@ function hardDrop() {
spawnPiece()
this.update = function(dt) {
var update = function(dt) {
if (gameOver) return
// ======= Horizontal Movement Gate =======
@@ -243,7 +243,7 @@ this.update = function(dt) {
}
}
this.hud = function() {
var hud = function() {
// Clear screen
draw.rectangle({x:0, y:0, width:config.width, height:config.height}, [0,0,0,1])