Skip to content

Commit

Permalink
tutorial now will keep showing unless played all the way through
Browse files Browse the repository at this point in the history
  • Loading branch information
vjsingh committed Apr 5, 2011
1 parent 919c32e commit 3c1f3bd
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions in_game_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,12 @@ var in_game_state = function (p, previous_state, game_type) {
if (game_type === 1
// if the tutorial hasn't been done, do on easy mode
|| (game_type === 0 && !g_tut_done) ){
is_tutorial = false; //true;
is_tutorial = true;
}
if (game_type < 2) {
GLOBAL_is_easy = true;
}

// the tutorial will have been done once by now
// (although the player might have died and not seen the whole thing)
// TODO change to ensure that player sees whole tutorial??
g_tut_done = true;

// the popup to draw at a given time
// null if there is none
Expand Down Expand Up @@ -214,6 +210,19 @@ var in_game_state = function (p, previous_state, game_type) {
show_popup(text);
tut_flags[type] = false;
}
allFinished = true;
for_each(
keys(tut_msgs),
function(type) {
if (tut_flags[type]) {
allFinished = false;
}
}
);
// the tutorial will have been completely finished by now
if (allFinished) {
g_tut_done = true;
}
}
};
return tut_obj;
Expand Down

0 comments on commit 3c1f3bd

Please sign in to comment.