Permalink
Browse files

Merge pull request #126 from mikecules/master

Added activity to begin transition screen before activity begins...
  • Loading branch information...
2 parents 6cfbbbb + 049150c commit 310e83ef7367cc481fe365e0cae47c2e3e14de11 @mackrauss mackrauss committed Jun 4, 2012
@@ -66,7 +66,8 @@
},
activity_started: function(sev) {
var activity = sev.payload.activity_name.toLowerCase();
- app.hideGameOverScreen();
+ //app.hideGameOverScreen();
+ app.showBeginActivityScreen();
app.setCurrentTask(activityMapper[activity]);
},
next_video: function(sev) {
@@ -40,6 +40,7 @@ NEOplace.FrontWall = (function() {
'Time is up!'];
var currentTask = null;
+ var suspendTimer = false;
var currentTaskTickTimer = 0;
var tickInterval = 200;
var timeExpired = false;
@@ -129,7 +130,7 @@ NEOplace.FrontWall = (function() {
app.frontboardTrackerProcessor = function(){
- if (currentTask) {
+ if (currentTask && ! suspendTimer) {
currentTaskTickTimer += tickInterval;
app.taskStatusAnimationProcessor();
}
@@ -192,6 +193,26 @@ NEOplace.FrontWall = (function() {
jQuery('#achievement-description').html(statusCaptions[0]);
};
+ app.showBeginActivityScreen = function(){
+ app.stopTask();
+ suspendTimer = true;
+ var backgroundModal = jQuery("#modal-background");
+ jQuery('#achievement-symbol').hide();
+ jQuery('#achievement-description').html('Starting Activity...');
+
+ jQuery(backgroundModal).fadeIn(800, "linear", function(){
+ jQuery("#epic-task-completed-container").fadeIn(1000, 'linear', function(){
+
+ jQuery("#epic-task-completed-container").fadeOut(1500, 'linear', function(){
+ jQuery(backgroundModal).fadeOut('fast', 'linear', function(){ suspendTimer = false;});
+ });
+
+ }
+
+ );
+ });
+ };
+
// GAME OVER!!!
app.showTaskGameOverScreen = function(str) {
if (timeExpired) return;

0 comments on commit 310e83e

Please sign in to comment.