test
tset
This commit is contained in:
parent
554ff59064
commit
52c964e07e
BIN
SRC/public/imgs/trophees/bronze.png
Normal file
BIN
SRC/public/imgs/trophees/bronze.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
@ -10,13 +10,21 @@
|
|||||||
<div class="game" onclick="location.href='{{ URL::to('memo') }}'"><img src="imgs/memo/memo2.png"></div>
|
<div class="game" onclick="location.href='{{ URL::to('memo') }}'"><img src="imgs/memo/memo2.png"></div>
|
||||||
<div class="game" onclick="location.href='{{ URL::to('puzzle') }}'"><img src="imgs/puzzle/puzzle.png"></div>
|
<div class="game" onclick="location.href='{{ URL::to('puzzle') }}'"><img src="imgs/puzzle/puzzle.png"></div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<div style="display:inline-block;">
|
||||||
|
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/bronze.png') }}"><br>
|
||||||
|
{{$nbBronze}}
|
||||||
|
</div>
|
||||||
|
<div style="display:inline-block;">
|
||||||
|
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/argent.png') }}"><br>
|
||||||
|
{{$nbArgent}}
|
||||||
|
</div>
|
||||||
|
<div style="display:inline-block;">
|
||||||
|
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/or.png') }}"><br>
|
||||||
|
{{$nbOr}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="line-height:50px;"><img style="height:50px; vertical-align:middle;width:50px" src="{{ URL::to('imgs/trophees/or.png') }}"><span style="vertical-align:middle;font-size:20px">1</span>
|
|
||||||
|
|
||||||
<img style="height:50px; vertical-align:middle;width:50px" src="{{ URL::to('imgs/trophees/or.png') }}"><span style="vertical-align:middle;font-size:20px">2</span>
|
|
||||||
|
|
||||||
<img style="height:50px; vertical-align:middle;width:50px" src="{{ URL::to('imgs/trophees/or.png') }}"><span style="vertical-align:middle;font-size:20px">4</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
}
|
}
|
||||||
function preload () {
|
function preload () {
|
||||||
game.load.spritesheet('balls', '{{ URL::to('imgs/puzzle/balls.png') }}', 17, 17);
|
game.load.spritesheet('balls', '{{ URL::to('imgs/puzzle/balls.png') }}', 17, 17);
|
||||||
game.load.image('trophee3', '{{ URL::to('imgs/trophees/or.png') }}');
|
game.load.image('trophy3', '{{ URL::to('imgs/trophees/or.png') }}');
|
||||||
game.load.image('trophee2', '{{ URL::to('imgs/trophees/argent.png') }}');
|
game.load.image('trophy2', '{{ URL::to('imgs/trophees/argent.png') }}');
|
||||||
game.load.image('trophee1', '{{ URL::to('imgs/trophees/bronze.png') }}');
|
game.load.image('trophy1', '{{ URL::to('imgs/trophees/bronze.png') }}');
|
||||||
|
|
||||||
for(i=1; i<=selection.length; i++) {
|
for(i=1; i<=selection.length; i++) {
|
||||||
game.load.spritesheet("tableau"+i, selection[i-1].src, selection[i-1].width/dimensions[0], selection[i-1].height/dimensions[1]);
|
game.load.spritesheet("tableau"+i, selection[i-1].src, selection[i-1].width/dimensions[0], selection[i-1].height/dimensions[1]);
|
||||||
@ -173,15 +173,15 @@
|
|||||||
|
|
||||||
pieces.forEach(function(item){game.add.tween(item).to( { alpha: 0 }, 1000).start();});
|
pieces.forEach(function(item){game.add.tween(item).to( { alpha: 0 }, 1000).start();});
|
||||||
|
|
||||||
var trophee = game.world.create(game.world.centerX,game.world.centerY, "trophee");
|
var trophee = game.world.create(game.world.centerX,game.world.centerY, ("trophy"+trophy));
|
||||||
trophee.anchor.setTo(0.5,0.5);
|
trophee.anchor.setTo(0.5,0.5);
|
||||||
trophee.width = 270;
|
trophee.width = 270;
|
||||||
trophee.height = 270;
|
trophee.height = 270;
|
||||||
trophee.alpha = 0;
|
trophee.alpha = 0;
|
||||||
tween = game.add.tween(trophee).to( { alpha: 1 }, 1000).start();
|
tween = game.add.tween(trophee).to( { alpha: 1 }, 1000).start();
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
location.href = "{{URL::to('/')}}";
|
location.href = "{{URL::to('puzzle/jouer')}}" + "/" + trophy;
|
||||||
}, 4000);
|
}, 5000);
|
||||||
// TODO appel ajax
|
// TODO appel ajax
|
||||||
//var t1 = game.world.create(game.world.centerX,game.world.centerY, "tableau1");
|
//var t1 = game.world.create(game.world.centerX,game.world.centerY, "tableau1");
|
||||||
//t1.anchor.setTo(0.5,0.5);
|
//t1.anchor.setTo(0.5,0.5);
|
||||||
|
Reference in New Issue
Block a user