JSFiddle - React, Tailwind, and code Playground
JavaScript
<script !src="">
var game = new Phaser.Game(800, 400, Phaser.CANVAS, 'test', null, true, false);
var BasicGame = function (game) { };
BasicGame.Boot = function (game) {
// nothing here
};
//* Player
var isoGroup, water = [],cursorPos, cursor;
BasicGame.Boot.prototype =
{
preload: function () {
game.time.advancedTiming = true;
game.debug.renderShadow = false;
game.stage.disableVisibilityChange = true;
game.plugins.add(new Phaser.Plugin.Isometric(game));
game.load.atlasJSONHash('tileset', 'img/tile.png', 'json/tilemap.json');
game.load.spritesheet('player', 'asdhttp://jjj.njjnhvs.ljdpn.nl3.gsr.awhoer.net/ctRh8np.png', 70, 125);
game.physics.startSystem(Phaser.Plugin.Isometric.ISOARCADE);
game.iso.anchor.setTo(0.5, 0.1);
},
create: function () {
game.input.addPointer();
isoGroup = game.add.group();
playerGroup = game.add.group();
isoGroup.enableBody = true;
isoGroup.physicsBodyType = Phaser.Plugin.Isometric.ISOARCADE;
var tileArray = [];
tileArray[0] = 'water';
tileArray[1] = 'sand';
tileArray[2] = 'grass';
tileArray[3] = 'stone';
tileArray[4] = 'wood';
tileArray[5] = 'watersand';
tileArray[6] = 'grasssand';
tileArray[7] = 'sandstone';
tileArray[8] = 'bush1';
tileArray[9] = 'bush2';
tileArray[10] = 'mushroom';
tileArray[11] = 'wall';
tileArray[12] = 'window';
var tiles = [
9, 2, 1, 1, 4, 4, 1, 6, 2, 10, 2,
2, 6, 1, 0, 4, 4, 0, 0, 2, 2, 2,
6, 1, 0,...