Add: RecordUtil
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
var Game = {
|
||||
|
||||
preload: function() {
|
||||
game.stage.disableVisibilityChange = true;
|
||||
},
|
||||
|
||||
create: function() {
|
||||
game.physics.enable(this, Phaser.Physics.ARCADE);
|
||||
|
||||
@@ -25,9 +29,7 @@ var Game = {
|
||||
|
||||
// game stage
|
||||
var stars = game.add.group();
|
||||
|
||||
for (var i = 0; i < 128; i++)
|
||||
{
|
||||
for (var i = 0; i < 128; i++) {
|
||||
var randomY = game.rnd.integerInRange(60, GAME_SCREEN_SIZE.y - 80);
|
||||
stars.create(game.world.randomX, randomY, 'star');
|
||||
}
|
||||
@@ -39,7 +41,7 @@ var Game = {
|
||||
|
||||
this.aliens = [];
|
||||
for(var i = 0; i < 100; i++) {
|
||||
var alien = new Alien(this.spaceship,
|
||||
var alien = new Missile(this.spaceship,
|
||||
(function() {
|
||||
this.spaceship.alpha = 0;
|
||||
this.spaceship.body.enable = false;
|
||||
@@ -58,20 +60,6 @@ var Game = {
|
||||
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
|
||||
screenTopUI.makeFullScreenButton();
|
||||
|
||||
/*
|
||||
var scoreBoard = new ScoreBoard();
|
||||
this.scoreManager.addOnChangeScoreListener( function(score) {
|
||||
sessionStorageManager.setRecord(score);
|
||||
scoreBoard.printScore(NumberUtil.numberWithCommas(score));
|
||||
});
|
||||
this.scoreManager.addOnChangeHighScoreListener( function(highScore) {
|
||||
// console.log(highScore);
|
||||
// sessionStorageManager.setAppHighestRecord(highScore);
|
||||
sessionStorageManager.setIsNewBestRecrd(true);
|
||||
// screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
});
|
||||
*/
|
||||
|
||||
this.stopWatch = new StopWatch(
|
||||
60, // sec
|
||||
(function() {
|
||||
@@ -91,8 +79,8 @@ var Game = {
|
||||
|
||||
// this.startGame();
|
||||
|
||||
this.spaceship.setActive(true);
|
||||
this.countDown();
|
||||
this.spaceship.setActive(true);
|
||||
},
|
||||
|
||||
|
||||
@@ -202,7 +190,7 @@ var Game = {
|
||||
hitStarEmitter.maxParticleScale = 3;
|
||||
hitStarEmitter.forEach(
|
||||
function(particle) {
|
||||
particle.tint = 0xFFd700;
|
||||
particle.tint = 0xadff2f;
|
||||
}
|
||||
);
|
||||
hitStarEmitter.gravity = 0;
|
||||
|
||||
Reference in New Issue
Block a user