tset
This commit is contained in:
alexandre-pereira 2015-03-20 18:38:41 +01:00
parent 554ff59064
commit 52c964e07e
3 changed files with 19 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -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('puzzle') }}'"><img src="imgs/puzzle/puzzle.png"></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>
<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>
<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>
@endsection

View File

@ -18,9 +18,9 @@
}
function preload () {
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('trophee2', '{{ URL::to('imgs/trophees/argent.png') }}');
game.load.image('trophee1', '{{ URL::to('imgs/trophees/bronze.png') }}');
game.load.image('trophy3', '{{ URL::to('imgs/trophees/or.png') }}');
game.load.image('trophy2', '{{ URL::to('imgs/trophees/argent.png') }}');
game.load.image('trophy1', '{{ URL::to('imgs/trophees/bronze.png') }}');
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]);
@ -173,15 +173,15 @@
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.width = 270;
trophee.height = 270;
trophee.alpha = 0;
tween = game.add.tween(trophee).to( { alpha: 1 }, 1000).start();
setTimeout(function(){
location.href = "{{URL::to('/')}}";
}, 4000);
location.href = "{{URL::to('puzzle/jouer')}}" + "/" + trophy;
}, 5000);
// TODO appel ajax
//var t1 = game.world.create(game.world.centerX,game.world.centerY, "tableau1");
//t1.anchor.setTo(0.5,0.5);