You are not my master

This commit is contained in:
alexandre-pereira 2015-03-18 19:47:36 +01:00
parent 827fc50875
commit 4570db86fe
8 changed files with 44 additions and 36 deletions

View File

@ -105,7 +105,7 @@ nav input {
height: 20px; height: 20px;
} }
button { button.level {
vertical-align:top; vertical-align:top;
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
@ -121,10 +121,10 @@ button {
outline: 0; outline: 0;
transition: all 0.2s; transition: all 0.2s;
} }
button:hover { button.level:hover {
border-bottom-width: 4px; border-bottom-width: 4px;
} }
button:active { button.level:active {
border-bottom-width: 2px; border-bottom-width: 2px;
} }

View File

@ -459,24 +459,18 @@ left: 56.3333%%;
* *
* A simple helper class for game buttons. Edit at your will. * A simple helper class for game buttons. Edit at your will.
*/ */
.mg__button span {
vertical-align:middle;
}
.mg__button { .mg__button {
margin: 0; margin: 0;
display: inline-block; display: inline-block;
padding: 5px; padding: 15px;
color: #fff; color: #fff;
font-family: "Roboto Slab", serif;
font-size: 14px; font-size: 14px;
line-height:18px;
appearance: none; appearance: none;
background: #ff3c50; background: #ff3c50;
border: none; border-radius: 4px;
border-radius: 3px;
box-shadow: none;
cursor: pointer; cursor: pointer;
border: none;
} }
/* ============================================================================= /* =============================================================================

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -259,7 +259,7 @@
if (self.flippedTiles == self.numTiles) { if (self.flippedTiles == self.numTiles) {
self._winGame(); self._winGame();
} }
}, 1500 ); }, 500 );
// plus one on the move counter // plus one on the move counter
this._gameCounterPlusOne(); this._gameCounterPlusOne();
@ -364,7 +364,6 @@ Memory.prototype._winGame = function() {
firework(); firework();
this.gameMessages.innerHTML = '<h2 class="mg__onend--heading"><span class="icon-trophy"></span></h2>\ this.gameMessages.innerHTML = '<h2 class="mg__onend--heading"><span class="icon-trophy"></span></h2>\
<p class="mg__onend--message">Vous avez gagné votre partie en ' + this.numMoves + ' coups !</p>\
<button id="mg__onend--restart" class="mg__button"><span class="icon-spinner11"></span></button>'; <button id="mg__onend--restart" class="mg__button"><span class="icon-spinner11"></span></button>';
//var texteADire = "Bravo, tu as gagné en "+this.numMoves+" coups ! "; //var texteADire = "Bravo, tu as gagné en "+this.numMoves+" coups ! ";

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('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>
<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

View File

@ -10,18 +10,13 @@
</div> </div>
<br> <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> </div>

View File

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

View File

@ -8,17 +8,18 @@
style="background:url('{{ URL::to('imgs/puzzle/puzzle.png') }}'); width: 50%;"> style="background:url('{{ URL::to('imgs/puzzle/puzzle.png') }}'); width: 50%;">
</div> </div>
<br> <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>
<div style="position: absolute; left: 0; bottom:0; padding-left:10px;">
<img src="{{ URL::to('imgs/previouspage.png') }}">
</div>
@section('page-css') @section('page-css')
<link href="{{ URL::to('css/fonts/style.css') }}" rel="stylesheet" type="text/css"/> <link href="{{ URL::to('css/fonts/style.css') }}" rel="stylesheet" type="text/css"/>