made falling scooters mobile ready, moved insta gfx to graphics folder

This commit is contained in:
dennisdebel 2020-10-09 15:52:01 +02:00
parent 27cf0e854c
commit fd5566c443
20 changed files with 16 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

0
graphics/falling-scooters/README.md Executable file → Normal file
View File

0
graphics/falling-scooters/assets/fruit-sprites.json Executable file → Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

11
graphics/falling-scooters/index.html Executable file → Normal file
View 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>

View File

@ -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
View File

0
graphics/falling-scooters/spritesheet.tps Executable file → Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

View File

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB