Skip to content

Commit

Permalink
Merge branch 'master' of github.com:TheDeveloper/barnyrd-dash
Browse files Browse the repository at this point in the history
  • Loading branch information
dscape committed Sep 25, 2011
2 parents 31d5765 + c720783 commit 1906242
Show file tree
Hide file tree
Showing 6 changed files with 921 additions and 5 deletions.
Binary file added public/images/text_loser_300x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/javascripts/game.js
Expand Up @@ -7,7 +7,7 @@ var Game = function(sprites, chosen){
var finish = function(id){
if (id == chosen){
var winnings = 25
var myCreds = localStorage['creds'] || 40;
var myCreds = parseInt(localStorage['creds']) || 40;
localStorage['creds'] = myCreds + winnings
showWin(winnings)
} else {
Expand Down Expand Up @@ -100,7 +100,7 @@ var showWin = function(money){

var showLose = function(){
$('.notice').remove()
var el = $('<div class="notice">'+ '<img src="images/lose.png" />' + '</div>')
var el = $('<div class="notice"><br/><br/>'+ '<img src="images/text_loser_300x100.png" />' + '</div>')
$('.gameArea').append(el);
el.click(function(){ window.location = '/pen' })
}
Expand Down
3 changes: 2 additions & 1 deletion public/javascripts/views/play_view.js
Expand Up @@ -21,7 +21,8 @@ var PlayView = function(sprites, chosen){
this.render = function(frameNum){
ctx.clearRect(0,0, canvas.width, canvas.height)
for (var i=0; i < sprites.length; i++) {
$('#l'+i).css('left', (sprites[i].position.x - 240) + 'px')
var width = $('#l'+i).width()
$('#l'+i).css('left', (sprites[i].position.x - width - 50) + 'px')
$('#l'+i).css('top', ((laneHeight * sprites[i].lane) + spriteHeight -2) - 20);
if (i == chosen)
$('#l'+i).css('color', 'red');
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/views/screens.js
Expand Up @@ -6,7 +6,7 @@ var LobbyScreen = function(contestants){
this.template.find('.startBtn').click( function(){
if (currentID){
self.template.remove();
contestants[currentID].maxSpeed = 6;
// contestants[currentID].maxSpeed;
new Game(contestants, currentID)
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/master.css
Expand Up @@ -156,7 +156,7 @@ a {
}
.label {
position: absolute;
left: -50px;
left: -200px;
display: inline-block;
text-align: right;
font-family: Georgia, 'Times New Roman', serif;
Expand Down

0 comments on commit 1906242

Please sign in to comment.