/**
* @author Pavle Goloskokovic (http://prunegames.com)
*
* Images by Walter Newton (http://walternewton.tumblr.com/post/58684376490/like-a-train-in-the-night)
* Music by Classical 8 Bit (http://classical8bit.tumblr.com/) / CC BY
*/
var config = {
type: Phaser.AUTO,
parent: 'phaser-example',
width: 800,
height: 600,
scene: {
preload: preload,
create: create,
update: update
},
pixelArt: true,
audio: {
disableWebAudio: true
}
};
var horseFrames = [];
for(var i=0; i<12; i++)
{
horseFrames.push({
key: 'horse'+ ('0'+i).slice(-2),
frame: '__BASE'
});
}
var game = new Phaser.Game(config);
function preload ()
{
this.load.setBaseURL('https://cdn.phaserfiles.com/v355');
this.load.bitmapFont('atari-classic', 'assets/fonts/bitmap/atari-classic.png', 'assets/fonts/bitmap/atari-classic.xml');
// Loading horse animation
for(var i=0; i
Scan to open on your mobile device
/** * @author Pavle Goloskokovic(http://prunegames.com) * * Images by Walter Newton (http://walternewton.tumblr.com/post/58684376490/like-a-train-in-the-night) * Music by Classical 8 Bit (http://classical8bit.tumblr.com/) / CC BY */ var config = { type: Phaser.AUTO, parent: 'phaser-example', width: 800, height: 600, scene: { preload: preload, create: create, update: update }, pixelArt: true, audio: { disableWebAudio: true } }; var horseFrames = []; for(var i=0; i<12; i++) { horseFrames.push({ key: 'horse'+ ('0'+i).slice(-2), frame: '__BASE' }); } var game = new Phaser.Game(config); function preload () { this.load.setBaseURL('https://cdn.phaserfiles.com/v355'); this.load.bitmapFont('atari-classic', 'assets/fonts/bitmap/atari-classic.png', 'assets/fonts/bitmap/atari-classic.xml'); // Loading horse animation for(var i=0; i