made falling scooters mobile ready, moved insta gfx to graphics folder
0
graphics/falling-scooters/README.md
Executable file → Normal file
0
graphics/falling-scooters/assets/fruit-sprites.json
Executable file → Normal file
Before Width: | Height: | Size: 13 KiB |
11
graphics/falling-scooters/index.html
Executable file → Normal file
@ -25,14 +25,23 @@
|
||||
|
||||
#game
|
||||
{
|
||||
width: 100;
|
||||
height: 100;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#inviteDiv {
|
||||
color: aquamarine;
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="phaser.min.js?v=3100" charset="utf-8"></script>
|
||||
<script src="index.js" charset="utf-8"></script>
|
||||
|
||||
<div id="inviteDiv"><h1>YOU'RE INVITED!<h1></div>
|
||||
<div id="game"></div>
|
||||
|
||||
</body>
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* This example show how to load complex shapes created with PhysicsEditor (https://www.codeandweb.com/physicseditor)
|
||||
*
|
||||
* Scaling via: https://www.joshmorony.com/how-to-scale-a-game-for-all-device-sizes-in-phaser/
|
||||
*/
|
||||
|
||||
|
||||
@ -9,8 +11,8 @@ var config = {
|
||||
mode: Phaser.Scale.FIT,
|
||||
parent: 'game',
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
width: 1024,
|
||||
height: 600
|
||||
width: window.innerWidth * window.devicePixelRatio,
|
||||
height: window.innerHeight * window.devicePixelRatio
|
||||
}, transparent: true,
|
||||
backgroundColor: 0xffffff,
|
||||
scene: {
|
||||
@ -56,6 +58,8 @@ function create() {
|
||||
var sprites = ['crate','banana','orange','cherries']; //array to choose random sprite from
|
||||
|
||||
this.input.on('pointerdown', function (pointer) {
|
||||
// var touchX = pointer.x;
|
||||
// var touchY = pointer.y;
|
||||
this.matter.add.sprite(pointer.x, pointer.y, 'sheet', sprites[getRandomInt(4)], {shape: shapes.banana});
|
||||
}, this);
|
||||
}
|
||||
|
0
graphics/falling-scooters/shapes.pes
Executable file → Normal file
0
graphics/falling-scooters/spritesheet.tps
Executable file → Normal file
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |