Skip to content

Commit bc451b2

Browse files
authored
Merge pull request #53 from a2i2/joost/remove-end-scene
Remove end scene
2 parents dca1813 + 932a289 commit bc451b2

File tree

6 files changed

+11
-497
lines changed

6 files changed

+11
-497
lines changed

public/src/assets/trials_test.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11

22
{
3-
"reward1": [ 3],
4-
5-
"effort1": [ 0.8],
6-
7-
"reward2": [ 1],
8-
9-
"effort2": [ 0.2]
3+
"catchIdx": [0, 1],
4+
"reward1": [7, 6, 4, 5],
5+
"reward2": [4, 5, 2, 3],
6+
"effort1": [0.7, 0.5, 0.8, 0.6],
7+
"effort2": [0.3, 0.2, 0.3, 0.4]
108
}

public/src/elements/instructionsPanel.js

Lines changed: 0 additions & 125 deletions
This file was deleted.

public/src/scenes/instructionsScene.js

Lines changed: 0 additions & 197 deletions
This file was deleted.

public/src/scenes/mainTask.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,14 @@ export default class MainTask extends BaseScene {
353353
// allow player to move
354354
this.player.update();
355355

356-
////////////MOVE ON TO NEXT SCENE WHEN ALL TRIALS HAVE RUN////////////////
356+
////////////GAME COMPLETE WHEN ALL TRIALS HAVE RUN////////////////
357357
if (trialNo == maxTrials) {
358-
this.nextScene();
358+
// Send message to the app to indicate that the game is complete
359+
EmbedContext.sendMessage('gameComplete', {});
360+
// Stop the scene so that all visuals are removed
361+
this.scene.stop();
359362
}
360363
}
361-
362-
nextScene() {
363-
this.registry.set('CoinsRunningTotal', nCoins);
364-
this.launchNextScene();
365-
}
366364
}
367365

368366
///////////////////////////////FUNCTIONS FOR CONTROLLING TRIAL SEQUENCE/////////////////////////////////////

0 commit comments

Comments
 (0)