fix prosperon layout
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user