diff --git a/js/CGameBase.js b/js/CGameBase.js
index 9a74ba0..afccab7 100644
--- a/js/CGameBase.js
+++ b/js/CGameBase.js
@@ -457,7 +457,8 @@ CGameBase.prototype.update = function () {
this.raceTimer =
this.raceTimer ||
setInterval(() => {
- this.raceTime += 10;
+ this._iGameState;
+ this.raceTime += this._iGameState === STATE_GAME_END ? 0 : 10;
this._oInterface.refreshRaceTime(this.raceTime);
}, 10);
diff --git a/js/CLang.js b/js/CLang.js
index 5d0e41e..ee66c54 100644
--- a/js/CLang.js
+++ b/js/CLang.js
@@ -25,7 +25,7 @@ var TEXT_LAP = "%s / %s";
var TEXT_SHARE_IMAGE = "200x200.jpg";
var TEXT_SHARE_TITLE = "¡Felicidades!";
var TEXT_SHARE_MSG1 = "Has recolectado ";
-var TEXT_YOUR_TIME = "Tu tiempo: ";
+var TEXT_YOUR_TIME = "TU RESULTADO: ";
var TEXT_SHARE_MSG2 =
" puntos!
¡Comparte tu puntuación con tus amigos!";
var TEXT_SHARE_SHARE1 = "Mi puntuación es ";
diff --git a/js/CLosePanel.js b/js/CLosePanel.js
index 8d353a5..0e86798 100644
--- a/js/CLosePanel.js
+++ b/js/CLosePanel.js
@@ -7,53 +7,69 @@ function CLosePanel(iPlayerRank){
var _oParent;
var _pStartPanelPos;
- this._init = function(){
-
- setVolume(s_aSounds["game_soundtrack"], SOUNDTRACK_VOLUME_IN_GAME);
-
- _oFade = new createjs.Shape();
- _oFade.graphics.beginFill("black").drawRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);
- _oFade.alpha = 0;
- _oFade.on("mousedown",function(){});
- s_oStage.addChild(_oFade);
-
- new createjs.Tween.get(_oFade).to({alpha:0.7},500);
-
- _oPanelContainer = new createjs.Container();
- s_oStage.addChild(_oPanelContainer);
-
- var oSprite = s_oSpriteLibrary.getSprite('msg_box');
- var oPanel = createBitmap(oSprite);
- oPanel.regX = oSprite.width/2;
- oPanel.regY = oSprite.height/2;
- _oPanelContainer.addChild(oPanel);
-
- _oPanelContainer.x = CANVAS_WIDTH/2;
- _oPanelContainer.y = CANVAS_HEIGHT + oSprite.height/2;
- _pStartPanelPos = {x: _oPanelContainer.x, y: _oPanelContainer.y};
- new createjs.Tween.get(_oPanelContainer).to({y:CANVAS_HEIGHT/2},500, createjs.Ease.quartIn);
+ this._init = function () {
+ setVolume(s_aSounds["game_soundtrack"], SOUNDTRACK_VOLUME_IN_GAME);
- var oTitle = new CTLText(_oPanelContainer,
- -300,-100, 600, 120,
- 60, "center", "#fff", PRIMARY_FONT, 1.2,
- 0, 0,
- sprintf(TEXT_LOSE,ordinal(iPlayerRank),ordinal(MIN_RANK_FOR_WIN)),
- true, true, true,
- false );
- oTitle.setStroke(10,"#000");
-
-
- var oSprite = s_oSpriteLibrary.getSprite('but_exit');
- _oExitBut = new CGfxButton(0, 100, oSprite,_oPanelContainer);
- _oExitBut.addEventListener(ON_MOUSE_UP, this._onExit, this);
-
- var oSprite = s_oSpriteLibrary.getSprite('but_restart');
- _oRestartBut = new CGfxButton(-120, 100, oSprite,_oPanelContainer);
- _oRestartBut.addEventListener(ON_MOUSE_UP, this._onRestart, this);
- _oRestartBut.setVisible(false);
-
+ _oFade = new createjs.Shape();
+ _oFade.graphics
+ .beginFill("black")
+ .drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);
+ _oFade.alpha = 0;
+ _oFade.on("mousedown", function () {});
+ s_oStage.addChild(_oFade);
+
+ new createjs.Tween.get(_oFade).to({ alpha: 0.7 }, 500);
+
+ _oPanelContainer = new createjs.Container();
+ s_oStage.addChild(_oPanelContainer);
+
+ var oSprite = s_oSpriteLibrary.getSprite("msg_box");
+ var oPanel = createBitmap(oSprite);
+ oPanel.regX = oSprite.width / 2;
+ oPanel.regY = oSprite.height / 2;
+ _oPanelContainer.addChild(oPanel);
+
+ _oPanelContainer.x = CANVAS_WIDTH / 2;
+ _oPanelContainer.y = CANVAS_HEIGHT + oSprite.height / 2;
+ _pStartPanelPos = { x: _oPanelContainer.x, y: _oPanelContainer.y };
+ new createjs.Tween.get(_oPanelContainer).to(
+ { y: CANVAS_HEIGHT / 2 },
+ 500,
+ createjs.Ease.quartIn
+ );
+
+ var oTitle = new CTLText(
+ _oPanelContainer,
+ -300,
+ -100,
+ 600,
+ 120,
+ 60,
+ "center",
+ "#fff",
+ PRIMARY_FONT,
+ 1.2,
+ 0,
+ 0,
+ sprintf(TEXT_LOSE, ordinal(iPlayerRank), ordinal(MIN_RANK_FOR_WIN)),
+ true,
+ true,
+ true,
+ false
+ );
+ oTitle.setStroke(10, "#000");
+
+ var oSprite = s_oSpriteLibrary.getSprite("but_exit");
+ _oExitBut = new CGfxButton(0, 100, oSprite, _oPanelContainer);
+ _oExitBut.addEventListener(ON_MOUSE_UP, this._onExit, this);
+
+ var oSprite = s_oSpriteLibrary.getSprite("but_restart");
+ _oRestartBut = new CGfxButton(-120, 100, oSprite, _oPanelContainer);
+ _oRestartBut.addEventListener(ON_MOUSE_UP, this._onRestart, this);
+ _oRestartBut.setVisible(false);
};
-
+
+
this.unload = function(){
s_oStage.removeChild(_oPanelContainer);
_oFade.off("mousedown",function(){});
diff --git a/js/CMain.js b/js/CMain.js
index ae3907f..4f70b5d 100644
--- a/js/CMain.js
+++ b/js/CMain.js
@@ -342,7 +342,7 @@ function CMain(oData) {
s_oSpriteLibrary.addSprite("gold_cup", "./sprites/gold_cup.png");
s_oSpriteLibrary.addSprite("silver_cup", "./sprites/silver_cup.png");
s_oSpriteLibrary.addSprite("bronze_cup", "./sprites/bronze_cup.png");
- s_oSpriteLibrary.addSprite("soothing_cup", "./sprites/soothing_cup.png");
+ s_oSpriteLibrary.addSprite("soothing_cup", "./sprites/no_cup.png");
RESOURCE_TO_LOAD += s_oSpriteLibrary.getNumSprites();
s_oSpriteLibrary.loadSprites(5);
diff --git a/js/CMenu.js b/js/CMenu.js
index f39a54b..b39fffd 100644
--- a/js/CMenu.js
+++ b/js/CMenu.js
@@ -26,7 +26,7 @@ function CMenu() {
_oBg.y = CANVAS_HEIGHT / 2;
_oBg.regX = oSprite.width / 2;
_oBg.regY = oSprite.height / 2.15;
- _oBg.scale = 1.7;
+ _oBg.scale = 1;
s_oStage.addChild(_oBg);
var oSprite = s_oSpriteLibrary.getSprite("logo_menu");
diff --git a/js/CNextLevelPanel.js b/js/CNextLevelPanel.js
index bdf9fc5..db6222e 100644
--- a/js/CNextLevelPanel.js
+++ b/js/CNextLevelPanel.js
@@ -96,42 +96,42 @@ function CNextLevelPanel(iRank, iScore, iLevel, raceTime) {
var oScoreTextHeader = new CTLText(
oScoreContainer,
-100,
- -50,
+ -30,
150,
50,
- 50,
- "right",
+ 30,
+ "left",
"#fff",
PRIMARY_FONT,
1,
0,
0,
- "Tu tiempo:",
- true,
- true,
+ "TU RESULTADO:",
false,
+ true,
false,
+ false
);
oScoreTextHeader.setStroke(10, "#000");
var oScoreText = new CTLText(
oScoreContainer,
-100,
- -20,
+ 20,
150,
50,
- 50,
- "right",
+ 30,
+ "left",
"#fff",
PRIMARY_FONT,
1,
0,
0,
formatTimeCustomly(raceTime),
- true,
- true,
false,
+ true,
false,
+ false
);
oScoreText.setStroke(10, "#000");
@@ -150,9 +150,49 @@ function CNextLevelPanel(iRank, iScore, iLevel, raceTime) {
_oContinueBut.addEventListener(ON_MOUSE_UP, this._onContinue, this);
_oContinueBut.pulseAnimation();
+ new CTLText(
+ _oPanelContainer,
+ 90,
+ 190,
+ 50,
+ 50,
+ 30,
+ "center",
+ "#fff",
+ PRIMARY_FONT,
+ 1.2,
+ 0,
+ 0,
+ "Guardar",
+ false,
+ true,
+ true,
+ false
+ ).setStroke(10, "#000");
+
var oSprite = s_oSpriteLibrary.getSprite("but_restart");
_oRestartBut = new CGfxButton(-120, 100, oSprite, _oPanelContainer);
_oRestartBut.addEventListener(ON_MOUSE_UP, this._onRestart, this);
+
+ new CTLText(
+ _oPanelContainer,
+ -150,
+ 190,
+ 50,
+ 50,
+ 30,
+ "center",
+ "#fff",
+ PRIMARY_FONT,
+ 1.2,
+ 0,
+ 0,
+ "Reintentar",
+ false,
+ true,
+ true,
+ false
+ ).setStroke(10, "#000");
};
this.unload = function () {
diff --git a/sprites/no_cup.png b/sprites/no_cup.png
new file mode 100644
index 0000000..2c07e75
Binary files /dev/null and b/sprites/no_cup.png differ
diff --git a/sprites/soothing_cup.png b/sprites/soothing_cup.png
deleted file mode 100644
index ae88158..0000000
Binary files a/sprites/soothing_cup.png and /dev/null differ