Add: study - RoundRectButton

This commit is contained in:
2018-04-30 10:48:56 +09:00
parent fca853fe97
commit 581efd0777
3 changed files with 152 additions and 0 deletions
@@ -0,0 +1,38 @@
/////////////////////////////
// Main game
var game = new Phaser.Game(1000, 800, Phaser.CANVAS, "Round rect image button test",
{preload:preload, create:create, update:update, render:render});
function preload() {
game.load.image('phaser', './image/phaser.png');
// game.load.spritesheet('button', './image/button_basic.png', 200, 100);
}
function create() {
var i = game.add.image(game.world.centerX, game.world.centerY + 70, 'phaser');
i.anchor.set(0.5);
game.stage.backgroundColor = '#4d4d4d';
graphics = game.add.graphics(0, 0);
new RoundRectButton(new RectSetting(200, 100));
}
function update() {
}
function render() {
// showDebugMessage();
}
/////////////////////////////
// custom methods
function showDebugMessage() {
// game.debug.text( "This is debug text 한글 " + spriteMushroom.x + ", " + spriteMushroom.y + ", highscore : " + highScore, 100, 380 );
}