Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Pizzicato committed Mar 26, 2011
1 parent fa070b1 commit 0077b4b
Show file tree
Hide file tree
Showing 25 changed files with 1,071 additions and 372 deletions.
Binary file added ost/Final_fermatRoom.mp3
Binary file not shown.
Binary file added ost/bucleSofter_fermatRoom.mp3
Binary file not shown.
Binary file added ost/bucle_fermatRoom.mp3
Binary file not shown.
9 changes: 7 additions & 2 deletions web/fermat.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
<html lang="es">
<head>
<link rel="stylesheet" href="stylesheets/fermat.css" type="text/css" />
<link rel="stylesheet" href="stylesheets/jquery-ui.css" type="text/css" />
<script src="javascripts/jquery.min.js"></script>
<script src="javascripts/jquery.timers.js"></script>
<script src="javascripts/application.js"></script>
<script src="javascripts/jquery.timers.js"></script>
<script src="javascripts/jquery.ui.core.js"></script>
<script src="javascripts/jquery.ui.widget.js"></script>
<script src="javascripts/jquery.ui.progressbar.js"></script>
<script src="javascripts/application.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>La Habitación de Fermat</title>
</head>
Expand Down Expand Up @@ -85,6 +89,7 @@
<div id="code-submit">OK</div>
<div class="clear"></div>
</form>
<div id="progressbar"></div>
</div>
</div>
<div id="right-column">
Expand Down
24 changes: 21 additions & 3 deletions web/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var GAME_DURATION = 600;
var FAIL_PENALTY = 30;
var WINNING_QUESTIONS = 3;
var MAX_TRIES = 3;

Expand Down Expand Up @@ -155,6 +156,11 @@ var app = {
else{
$('#code-text').val("");
$('#information-display p').css({color:'red'}).html('¡Respuesta incorrecta! Penalización de 30 s').fadeIn(500).fadeOut(3000);
$('#progressbar').everyTime(500,'gameTimer',function(i) {
$(this).progressbar({
value: i/60*100
}, 60);
});
}
}
return false;
Expand Down Expand Up @@ -213,7 +219,19 @@ var app = {


$(document).ready(function(){
app.gameBegin();
app.showScrollOnStartButtonClick();
app.showGameConsoleOnArrowClick();
//app.gameBegin();
//app.showScrollOnStartButtonClick();
//app.showGameConsoleOnArrowClick();
var stepDelay = 1000;
$('#progressbar').everyTime(stepDelay,'penaltyTimer',function(i) {
console.log(i);
$(this).progressbar({
value: 100 - i/(300)*stepDelay
}, 30000/stepDelay);
});
$('#scroll-wrapper').hide();
$('#game-console-wrapper').show();
$('#start-wrapper').hide();
$('form').hide();
$('#progressbar').show();
});
49 changes: 49 additions & 0 deletions web/javascripts/jquery-ui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0077b4b

Please sign in to comment.