This commit is contained in:
DonRenando
2015-03-19 12:49:59 +01:00
9 changed files with 44 additions and 36 deletions

View File

@ -9,7 +9,14 @@
<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>
<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

@ -10,18 +10,13 @@
</div>
<br>
<button onclick="location.href='{{ URL::to('memo/jouer/1') }}'"><span style="color:gold;"><span class="icon-star-full"></span></span><span class="icon-star-full"></span><span class="icon-star-full"></span></button>
<button class="level" onclick="location.href='{{ URL::to('memo/jouer/1') }}'"><span style="color:gold;"><span class="icon-star-full"></span></span><span class="icon-star-full"></span><span class="icon-star-full"></span></button>
<button onclick="location.href='{{ URL::to('memo/jouer/2') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span></span><span class="icon-star-full"></span></button>
<button class="level" onclick="location.href='{{ URL::to('memo/jouer/2') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span></span><span class="icon-star-full"></span></button>
<button onclick="location.href='{{ URL::to('memo/jouer/3') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span><span class="icon-star-full"></span></span></button><br>
<button class="level" onclick="location.href='{{ URL::to('memo/jouer/3') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span><span class="icon-star-full"></span></span></button><br>
<div style="line-height:50px;"></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">{{ $nbOr }}</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">{{ $nbOr }}</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">{{ $nbOr }}</span>
</div>
</div>

View File

@ -1,7 +1,6 @@
@extends('frontend/template')
@section('content')
<script src="/js/firework.js"></script>
<script src="{{ URL::to('js/phaser.min.js') }}"></script>
<script src="{{ URL::to('js/responsivevoice.js') }}"></script>
<script type="text/javascript">
@ -19,6 +18,7 @@
}
function preload () {
game.load.spritesheet('balls', '{{ URL::to('imgs/puzzle/balls.png') }}', 17, 17);
game.load.image('trophee', '{{ URL::to('imgs/trophees/or.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]);
@ -153,15 +153,14 @@
pieces.forEach(function(item){item.input.draggable = false;});
if(nbToPlay == currentPlayed)
{
firework();
leftEmitter = game.add.emitter(50, 50);
leftEmitter.bounce.setTo(0.5, 0.5);
leftEmitter.bounce.setTo(0.8, 0.8);
leftEmitter.setXSpeed(100, 200);
leftEmitter.setYSpeed(-50, 50);
leftEmitter.makeParticles('balls', 0, 10, 1, true);
rightEmitter = game.add.emitter(game.world.width - 50, 50);
rightEmitter.bounce.setTo(0.5, 0.5);
rightEmitter.bounce.setTo(0.8, 0.8);
rightEmitter.setXSpeed(-100, -200);
rightEmitter.setYSpeed(-50, 50);
rightEmitter.makeParticles('balls', 1, 10, 1, true);
@ -169,14 +168,27 @@
// explode, lifespan, frequency, quantity
leftEmitter.start(false, 10000, 20);
rightEmitter.start(false, 10000, 20);
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");
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('puzzle')}}";
}, 5000);
location.href = "{{URL::to('/')}}";
}, 4000);
//var t1 = game.world.create(game.world.centerX,game.world.centerY, "tableau1");
//t1.anchor.setTo(0.5,0.5);
}
else {
setTimeout(function(){
nextPuzzle();
}, 2000);
}, 1000);
}
}

View File

@ -8,17 +8,18 @@
style="background:url('{{ URL::to('imgs/puzzle/puzzle.png') }}'); width: 50%;">
</div>
<br>
<button onclick="location.href='{{ URL::to('puzzle/jouer/1') }}'"><span style="color:gold;"><span class="icon-star-full"></span></span><span class="icon-star-full"></span><span class="icon-star-full"></span></button>
<button class="level" onclick="location.href='{{ URL::to('puzzle/jouer/1') }}'"><span style="color:gold;"><span class="icon-star-full"></span></span><span class="icon-star-full"></span><span class="icon-star-full"></span></button>
<button onclick="location.href='{{ URL::to('puzzle/jouer/2') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span></span><span class="icon-star-full"></span></button>
<button class="level" onclick="location.href='{{ URL::to('puzzle/jouer/2') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span></span><span class="icon-star-full"></span></button>
<button onclick="location.href='{{ URL::to('puzzle/jouer/3') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span><span class="icon-star-full"></span></span></button>
<button class="level" onclick="location.href='{{ URL::to('puzzle/jouer/3') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span><span class="icon-star-full"></span></span></button>
</div>
<div style="position: relative; left: 0; bottom:-10%; padding-left:1%; ">
<a href="/"><img style="height: 80px;" src="{{ URL::to('imgs/previouspage.png') }}"></a>
</div>
@section('page-css')
<link href="{{ URL::to('css/fonts/style.css') }}" rel="stylesheet" type="text/css"/>