diff --git a/js/CMenu.js b/js/CMenu.js index 9456c77..fd04555 100644 --- a/js/CMenu.js +++ b/js/CMenu.js @@ -18,157 +18,227 @@ function CMenu(){ var _pStartPosFullscreen; var _pStartPosDelete; - this._init = function(){ - //console.clear(); - var oSprite = s_oSpriteLibrary.getSprite('bg_menu'); - _oBg = createBitmap(oSprite); - _oBg.x = CANVAS_WIDTH/2; - _oBg.y = CANVAS_HEIGHT/2; - _oBg.regX = oSprite.width/2; - _oBg.regY = oSprite.height/2; - s_oStage.addChild(_oBg); - - - var oSprite = s_oSpriteLibrary.getSprite('logo_menu'); - _oLogo = createBitmap(oSprite); - _oLogo.regX = oSprite.width/2; - _oLogo.regY = oSprite.height/2; - _oLogo.x = CANVAS_WIDTH/2; - _oLogo.y = CANVAS_HEIGHT/2-350; - _oLogo.scale = 0.6; - s_oStage.addChild(_oLogo); - - var oSpriteStart = s_oSpriteLibrary.getSprite('but_play'); - _oButPlay = new CGfxButton(CANVAS_WIDTH/2,CANVAS_HEIGHT/2 + 500,oSpriteStart,s_oStage); - _oButPlay.addEventListener(ON_MOUSE_UP, this._onButPlayRelease, this); - _oButPlay.pulseAnimation(); + this._init = function () { + //console.clear(); + var oSprite = s_oSpriteLibrary.getSprite("bg_menu"); + _oBg = createBitmap(oSprite); + _oBg.x = CANVAS_WIDTH / 2; + _oBg.y = CANVAS_HEIGHT / 2; + _oBg.regX = oSprite.width / 2; + _oBg.regY = oSprite.height / 2; + s_oStage.addChild(_oBg); - - _oScoreContainer = new createjs.Container(); - _oScoreContainer.x = _oButPlay.getX(); - _oScoreContainer.y = _oButPlay.getY()+210; - s_oStage.addChild(_oScoreContainer); - - var oSprite = s_oSpriteLibrary.getSprite('star'); - var oStar = createBitmap(oSprite); - oStar.regX = oSprite.width/2; - oStar.regY = oSprite.height/2; - _oScoreContainer.addChild(oStar); - - var iTotalScore = 0; - for(var i=0; i