yeah, it works
This commit is contained in:
parent
4e74e758d3
commit
2783c8c294
BIN
assets/blue.png
Normal file
BIN
assets/blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
assets/green.png
Normal file
BIN
assets/green.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
assets/grey.png
Normal file
BIN
assets/grey.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
assets/pink.png
Normal file
BIN
assets/pink.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -2,11 +2,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Click of the Titans</title>
|
||||
<style>body {margin: 0;padding: 0;}</style>
|
||||
<title>Click of the Aliens!</title>
|
||||
<style>body {margin: 0; padding: 0;}</style>
|
||||
|
||||
<script src="lib/phaser.min.js"></script>
|
||||
|
||||
<script src="src/game.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
1
lib/phaser.map
Normal file
1
lib/phaser.map
Normal file
File diff suppressed because one or more lines are too long
23
src/game.js
23
src/game.js
@ -0,0 +1,23 @@
|
||||
window.onload = function() {
|
||||
var game = new Phaser.Game(
|
||||
800,
|
||||
800,
|
||||
Phaser.AUTO,
|
||||
'',
|
||||
{ preload: preload, create: create });
|
||||
|
||||
function preload(){
|
||||
game.load.image('pink', 'assets/pink.png');
|
||||
game.load.image('green', 'assets/green.png');
|
||||
game.load.image('grey', 'assets/grey.png');
|
||||
game.load.image('blue', 'assets/blue.png');
|
||||
console.log("preload");
|
||||
}
|
||||
|
||||
function create(){
|
||||
var alienSprite = game.add.sprite(450, 290, 'pink');
|
||||
console.log(alienSprite);
|
||||
alienSprite.anchor.setTo(0.5, 0.5);
|
||||
}
|
||||
|
||||
};
|
Loading…
Reference in New Issue
Block a user