forked from carbonxx/noob-game
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
341 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# noob-game | ||
come when its completed :) | ||
# noob-game | ||
come when its completed :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>NOOB GAME</title> | ||
<script type="text/javascript" src="./phaser.min.js"></script> | ||
<link rel="stylesheet" href="./src/css/game.css" /> | ||
|
||
<script type="text/javascript" src="./src/js/bootGame.js"></script> | ||
<script type="text/javascript" src="./src/js/mainMenu.js"></script> | ||
<script type="text/javascript" src="./src/js/mainGame.js"></script> | ||
|
||
<script type="text/javascript" src="./src/js/game.js"></script> | ||
<script type="text/javascript" src="./src/js/console-messages.js"></script> | ||
</head> | ||
|
||
<body> | ||
<!-- this is empty --> | ||
</body> | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>NOOB GAME</title> | ||
<script type="text/javascript" src="./phaser.min.js"></script> | ||
<link rel="stylesheet" href="./src/css/game.css" /> | ||
|
||
<script type="text/javascript" src="./src/js/bootGame.js"></script> | ||
<script type="text/javascript" src="./src/js/mainMenu.js"></script> | ||
<script type="text/javascript" src="./src/js/mainGame.js"></script> | ||
|
||
<script type="text/javascript" src="./src/js/game.js"></script> | ||
<script type="text/javascript" src="./src/js/console-messages.js"></script> | ||
</head> | ||
|
||
<body> | ||
<!-- this is empty --> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
*{ | ||
margin: 0px; | ||
} | ||
|
||
body{ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background: rgb(27, 27, 27); | ||
} | ||
|
||
canvas { | ||
align-items: center; | ||
margin: auto; | ||
*{ | ||
margin: 0px; | ||
} | ||
|
||
body{ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background: rgb(27, 27, 27); | ||
} | ||
|
||
canvas { | ||
align-items: center; | ||
margin: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
class bootGame extends Phaser.Scene { | ||
constructor() { | ||
super("bootGame"); | ||
} | ||
|
||
preload() { | ||
//images | ||
this.load.image("bg", "src/assets/bg.png"); | ||
this.load.image("player", "src/assets/samurai.png"); | ||
//sprites | ||
this.load.spritesheet("ghost", "src/assets/ghost-sprite.png", { | ||
//ghost | ||
frameWidth: 75, | ||
frameHeight: 75, | ||
}); | ||
this.load.spritesheet("candy", "src/assets/candy-sprite.png", { | ||
// candy | ||
frameWidth: 22, | ||
frameHeight: 22, | ||
}); | ||
|
||
// audio | ||
// this.load.audio("roblox-death-audio", "src/assets/roblox-death.mp3"); // "src/assets/roblox-death.ogg", | ||
} | ||
|
||
create() { | ||
|
||
this.add.text(20, 20, "Loading Game..."); | ||
// create animations | ||
this.anims.create({ | ||
key: "candy_beam", | ||
frames: this.anims.generateFrameNumbers("candy", { | ||
start: 0, | ||
end: 1, | ||
}), | ||
frameRate: 5, | ||
repeat: -1, | ||
}); | ||
// ghost walk animation | ||
this.anims.create({ | ||
key: "ghost_walk", | ||
frames: this.anims.generateFrameNumbers("ghost", { | ||
start: 0, | ||
end: 1, | ||
}), | ||
frameRate: 5, | ||
repeat: -1, | ||
}); | ||
|
||
// this.deathSound = this.sound.add("roblox-death-audio"); | ||
|
||
this.scene.start("mainMenu"); | ||
} | ||
} | ||
class bootGame extends Phaser.Scene { | ||
constructor() { | ||
super("bootGame"); | ||
} | ||
|
||
preload() { | ||
//images | ||
this.load.image("bg", "src/assets/bg.png"); | ||
this.load.image("player", "src/assets/samurai.png"); | ||
//sprites | ||
this.load.spritesheet("ghost", "src/assets/ghost-sprite.png", { | ||
//ghost | ||
frameWidth: 75, | ||
frameHeight: 75, | ||
}); | ||
this.load.spritesheet("candy", "src/assets/candy-sprite.png", { | ||
// candy | ||
frameWidth: 22, | ||
frameHeight: 22, | ||
}); | ||
|
||
// audio | ||
// this.load.audio("roblox-death-audio", "src/assets/roblox-death.mp3"); // "src/assets/roblox-death.ogg", | ||
} | ||
|
||
create() { | ||
|
||
this.add.text(20, 20, "Loading Game..."); | ||
// create animations | ||
this.anims.create({ | ||
key: "candy_beam", | ||
frames: this.anims.generateFrameNumbers("candy", { | ||
start: 0, | ||
end: 1, | ||
}), | ||
frameRate: 5, | ||
repeat: -1, | ||
}); | ||
// ghost walk animation | ||
this.anims.create({ | ||
key: "ghost_walk", | ||
frames: this.anims.generateFrameNumbers("ghost", { | ||
start: 0, | ||
end: 1, | ||
}), | ||
frameRate: 5, | ||
repeat: -1, | ||
}); | ||
|
||
// this.deathSound = this.sound.add("roblox-death-audio"); | ||
|
||
this.scene.start("mainMenu"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
console.log(" Hows the music? \n\n .\n |\ \n _j .___,\n (_j |---|\n _| |\n .____. (_j _|\n |.--.| . (_J\n |l__j| .\n |+ oo| .\n l____j\n\n"); | ||
// * _____ | ||
// * __/_ /// | ||
// * / _/ \ | ||
// * \/_\=[o=o] | ||
// * \_, __) | ||
// * | _\ | ||
// * l______/ | ||
// * / :| | ||
// * / \ ;|- | ||
// * \_______j | ||
// * ./.....\.. | ||
// * | ||
|
||
// * _ _ | ||
// * /\\_//\ | ||
// * / o _ o \ | ||
// * /_ X _\ | ||
// * \_____/ | ||
// * / o \ | ||
// * / \__ | ||
// * \_(_|_)___ \ | ||
// * (___/ | ||
console.log(" Hows the music? \n\n .\n |\ \n _j .___,\n (_j |---|\n _| |\n .____. (_j _|\n |.--.| . (_J\n |l__j| .\n |+ oo| .\n l____j\n\n"); | ||
// * _____ | ||
// * __/_ /// | ||
// * / _/ \ | ||
// * \/_\=[o=o] | ||
// * \_, __) | ||
// * | _\ | ||
// * l______/ | ||
// * / :| | ||
// * / \ ;|- | ||
// * \_______j | ||
// * ./.....\.. | ||
// * | ||
|
||
// * _ _ | ||
// * /\\_//\ | ||
// * / o _ o \ | ||
// * /_ X _\ | ||
// * \_____/ | ||
// * / o \ | ||
// * / \__ | ||
// * \_(_|_)___ \ | ||
// * (___/ | ||
// * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
var config = { | ||
type: Phaser.AUTO, | ||
width: 1200, | ||
height: 675, | ||
scene: [bootGame, mainMenu, mainGame], | ||
pixelArt: true, | ||
physics: { | ||
default: "arcade", | ||
arcade: { | ||
debug: false, | ||
}, | ||
}, | ||
}; | ||
|
||
var player; //player | ||
var playerSpeed = 200; | ||
var distance; | ||
var target = new Phaser.Math.Vector2(); | ||
|
||
var candyTarget = new Phaser.Math.Vector2(); | ||
|
||
var game = new Phaser.Game(config); | ||
var config = { | ||
type: Phaser.AUTO, | ||
width: 1200, | ||
height: 675, | ||
scene: [bootGame, mainMenu, mainGame], | ||
pixelArt: true, | ||
physics: { | ||
default: "arcade", | ||
arcade: { | ||
debug: false, | ||
}, | ||
}, | ||
}; | ||
|
||
var player; //player | ||
var playerSpeed = 200; | ||
var distance; | ||
var target = new Phaser.Math.Vector2(); | ||
|
||
var candyTarget = new Phaser.Math.Vector2(); | ||
|
||
var game = new Phaser.Game(config); |
Oops, something went wrong.