Merge branch 'master' into release
commit
fbfd769349
|
@ -3,6 +3,8 @@ H5P Memory Game
|
||||||
|
|
||||||
Create your own memory games and test the memory of your site users with this simple yet beautiful HTML5 game.
|
Create your own memory games and test the memory of your site users with this simple yet beautiful HTML5 game.
|
||||||
|
|
||||||
|
[See it in action on H5P.org](https://h5p.org/memory-game)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"semantics": [
|
"semantics": [
|
||||||
{
|
{
|
||||||
"label": "Cartes",
|
"label": "Cartes",
|
||||||
"entity": "une carte",
|
"entity": "carte",
|
||||||
"field": {
|
"field": {
|
||||||
"label": "Carte",
|
"label": "Carte",
|
||||||
"fields": [
|
"fields": [
|
||||||
|
@ -17,19 +17,19 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Localisation",
|
"label": "Interface",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label": "Texte pour une carte à retourner",
|
"label": "Texte pour le nombre de cartes retournées",
|
||||||
"default": "Retourner"
|
"default": "Cartes retournées :"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Texte pour le temps passé",
|
"label": "Texte pour le temps passé",
|
||||||
"default": "Durée écoulée"
|
"default": "Temps écoulé :"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Texte de feedback",
|
"label": "Texte de l'appréciation finale",
|
||||||
"default": "Bon travail!"
|
"default": "Bien joué !"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,12 +36,15 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
var finished = (removed === cards.length);
|
var finished = (removed === cards.length);
|
||||||
var desc = card.getDescription();
|
var desc = card.getDescription();
|
||||||
|
|
||||||
|
if (finished) {
|
||||||
|
self.triggerXAPIScored(1, 1, 'completed');
|
||||||
|
}
|
||||||
|
|
||||||
if (desc !== undefined) {
|
if (desc !== undefined) {
|
||||||
// Pause timer and show desciption.
|
// Pause timer and show desciption.
|
||||||
timer.stop();
|
timer.stop();
|
||||||
popup.show(desc, card.getImage(), function () {
|
popup.show(desc, card.getImage(), function () {
|
||||||
if (finished) {
|
if (finished) {
|
||||||
self.triggerXAPIScored(1, 1, 'completed');
|
|
||||||
// Game has finished
|
// Game has finished
|
||||||
$feedback.addClass('h5p-show');
|
$feedback.addClass('h5p-show');
|
||||||
}
|
}
|
||||||
|
@ -52,7 +55,6 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (finished) {
|
else if (finished) {
|
||||||
self.triggerXAPIScored(1, 1, 'completed');
|
|
||||||
// Game has finished
|
// Game has finished
|
||||||
timer.stop();
|
timer.stop();
|
||||||
$feedback.addClass('h5p-show');
|
$feedback.addClass('h5p-show');
|
||||||
|
|
Loading…
Reference in New Issue