JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/photonstorm/phaser/master/build/phaser-093.js"></script>
<div id="game"></div>
<section>
<h2>Credits</h2>
<ul>
<li>Button created using <a href="http://cooltext.com" target="_top">Cool Text: Logo and Graphics Generator</a></li>
</ul>
</section>
CSS
* { font-family: Arial, Helvetica; }
JavaScript
(function() {
var __extend = function(parent, protoProps, staticProps) {
return Backbone.Model.extend.call(parent, protoProps, staticProps);
};
var URL_PREFIX = 'http://hackmaniac.de/PhaserTests/';
var SplashScreen = __extend(Phaser.State, {
init: function() {
this.loader.addImageFile('playButton', URL_PREFIX + 'assets/buttons/cooltext1009976418.png');
this.loader.load();
},
create: function() {
this.playButton = this.createSprite(this.stage.centerX, 250, 'playButton');
this.playButton._point = new Phaser.MicroPoint();
// this.playButton.rotation = 90;
this.playButton.align = Phaser.GameObject.ALIGN_CENTER;
this.playButton.overlapsPointExt = function(point) {
var GameObject = Phaser.GameObject;
var _dx = this.bounds.topLeft.x;
var _dy = this.bounds.topLeft.y;
var _dw = this.bounds.width * this.scale.x;
var _dh = this.bounds.height * this.scale.y;
if (this.align == GameObject.ALIGN_TOP_CENTER)
{
_dx -= _dw / 2;
}
else if (this.align == GameObject.ALIGN_TOP_RIGHT)
{
_dx -= _dw;
}
else if (this.align == GameObject.ALIGN_CENTER_LEFT)
{
_dy -= _dh / 2;
}
else if (this.align == GameObject.ALIGN_CENTER)
{
_dx -= _dw / 2;
_dy -= _dh / 2;
}
else if (this.align == GameObject.ALIGN_CENTER_RIGHT)
{
_dx -= _dw;
_dy -= _dh / 2;
}
else if (this.align == GameObject.ALIGN_BOTTOM_LEFT)
{
_dy...