This commit is contained in:
@@ -24,7 +24,8 @@ export default {
|
||||
mode: 'GamePlay'
|
||||
});
|
||||
manager = await new GameManager(engine, this.id);
|
||||
manager.addEventListener('the-end', _=>{
|
||||
manager.addEventListener('the-end', async e =>{
|
||||
await this.$api.user.addGameData({ id: this.id, score: e.score });
|
||||
this.$router.push('/');
|
||||
})
|
||||
window.addEventListener('resize', this.resize);
|
||||
|
||||
@@ -116,7 +116,6 @@ class PuzzleGame1 extends EventManager {
|
||||
s: 'PG2'
|
||||
});
|
||||
});
|
||||
//engine.dashboard.addPoints(10);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -160,7 +160,6 @@ class PuzzleGame2 extends EventManager {
|
||||
s: 'PG2'
|
||||
});
|
||||
});
|
||||
//engine.dashboard.addPoints(10);
|
||||
}
|
||||
};
|
||||
engine.addEventListener('beforeRender', this.update)
|
||||
|
||||
@@ -117,7 +117,6 @@ var PuzzleGame4 = function(context, gltf, w, h){
|
||||
})
|
||||
})
|
||||
this.dispatchEvent({type:'finish'})
|
||||
//context.dashboard.addPoints(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user