Skip to content

Commit

Permalink
Last touches
Browse files Browse the repository at this point in the history
Fixed rule list styling.
Change in game font to Audiowide.
  • Loading branch information
JoeKnome committed May 17, 2016
1 parent c0b882b commit 70eb9d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
5 changes: 4 additions & 1 deletion client/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ canvas {
text-align: center;
}


#rules {
width: 40%;
margin: 0 auto;
}

/* ONLINE USERS LIST PAGE */
#onlineUsersContainer {
Expand Down
24 changes: 12 additions & 12 deletions client/kinesthesia.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ function setupSocket() {
socket.on("score", function(data) {
// player point
if (data.side === player.side) {
windowManager.modifyText("gameHUD", "message", "text", {string: userdata.username + " scores a point!", css: "12pt 'Roboto'", color: "white"});
windowManager.modifyText("gameHUD", "message", "text", {string: userdata.username + " scores a point!", css: "12pt 'Audiowide'", color: "white"});
player.score += data.points;
windowManager.modifyText("playerHUD", "score", "text", {string: player.score.toString(), css: "12pt 'Roboto'", color: "white"});
windowManager.modifyText("playerHUD", "score", "text", {string: player.score.toString(), css: "12pt 'Audiowide'", color: "white"});
}
// opponent point
else {
windowManager.modifyText("gameHUD", "message", "text", {string: opponent.name + " scores a point!", css: "12pt 'Roboto'", color: "white"});
windowManager.modifyText("gameHUD", "message", "text", {string: opponent.name + " scores a point!", css: "12pt 'Audiowide'", color: "white"});
opponent.score += data.points;
windowManager.modifyText("opponentHUD", "score", "text", {string: opponent.score.toString(), css: "12pt 'Roboto'", color: "white"});
windowManager.modifyText("opponentHUD", "score", "text", {string: opponent.score.toString(), css: "12pt 'Audiowide'", color: "white"});
}
});

Expand All @@ -302,7 +302,7 @@ function setupSocket() {
sendAjax("/updateStats", data);

// update the main message box to say how they did
windowManager.modifyText("gameHUD", "message", "text", { string: "You " + data.status + "!", css: "12pt 'Roboto'", color: "white"});
windowManager.modifyText("gameHUD", "message", "text", { string: "You " + data.status + "!", css: "12pt 'Audiowide'", color: "white"});

// stop running the game if we're the host
if (IS_HOST) {
Expand Down Expand Up @@ -339,7 +339,7 @@ function initializeGame() {
setTimeout(update, 100);

// Notify user of game start
windowManager.modifyText("gameHUD", "message", "text", {string: "Game started. You are playing against " + opponent.name + ".", css: "12pt 'Roboto'", color: "white"});
windowManager.modifyText("gameHUD", "message", "text", {string: "Game started. You are playing against " + opponent.name + ".", css: "12pt 'Audiowide'", color: "white"});
}

// FUNCTION: Loads in some images
Expand Down Expand Up @@ -549,8 +549,8 @@ function setupUI() {
windowManager.makeUI("playerHUD", (player.side * canvas.width) - (player.side * 200), 0, 200, 65);
windowManager.modifyUI("playerHUD", "fill", {color: "rgb(0, 0, 0)"});
windowManager.modifyUI("playerHUD", "border", {color: COLORS[player.side], width: "1px"});
windowManager.makeText("playerHUD", "username", 45 , 15, canvas.width/10, canvas.height/5, userdata.username, "12pt 'Roboto'", "white");
windowManager.makeText("playerHUD", "score", 15, 15, 50, 50, player.score.toString(), "12pt 'Roboto'", "white");
windowManager.makeText("playerHUD", "username", 45 , 15, canvas.width/10, canvas.height/5, userdata.username, "12pt 'Audiowide'", "white");
windowManager.makeText("playerHUD", "score", 15, 15, 50, 50, player.score.toString(), "12pt 'Audiowide'", "white");
windowManager.makeImage("playerHUD", "currAbilityImg", 135, 0, 50, 50, player.currentAbility.img);
windowManager.makeBar("playerHUD", "abilityCooldown", 135, 55, 50, 5, 0, abilityCooldowns["Cannonball"].maxCooldown, 0);
windowManager.modifyBar("playerHUD", "abilityCooldown", "fill", { backColor: "rgb(100,100,100)", foreColor: COLORS[player.side] });
Expand All @@ -561,8 +561,8 @@ function setupUI() {
windowManager.makeUI("opponentHUD", (opponent.side * canvas.width) - (opponent.side * 200), 0, 200, 65);
windowManager.modifyUI("opponentHUD", "fill", {color: "rgb(0, 0, 0)"});
windowManager.modifyUI("opponentHUD", "border", {color: COLORS[opponent.side], width: "1px"});
windowManager.makeText("opponentHUD", "username", 45 , 15, canvas.width/10, canvas.height/5, opponent.name, "12pt 'Roboto'", "white");
windowManager.makeText("opponentHUD", "score", 15, 15, 50, 50, opponent.score.toString(), "12pt 'Roboto'", "white");
windowManager.makeText("opponentHUD", "username", 45 , 15, canvas.width/10, canvas.height/5, opponent.name, "12pt 'Audiowide'", "white");
windowManager.makeText("opponentHUD", "score", 15, 15, 50, 50, opponent.score.toString(), "12pt 'Audiowide'", "white");
windowManager.makeImage("opponentHUD", "currAbilityImg", 135, 0, 50, 50, opponent.currentAbility.img);
windowManager.toggleUI("opponentHUD");
//} end OPPONENT INFO HUD
Expand All @@ -571,8 +571,8 @@ function setupUI() {
windowManager.makeUI("gameHUD", canvas.width/2 - 250, 0, 500, 75);
windowManager.modifyUI("gameHUD", "fill", {color: "rgba(0, 0, 0, 0.5)"});
windowManager.modifyUI("gameHUD", "border", {color: COLORS.GREEN, width: "1px"});
windowManager.makeText("gameHUD", "message", 35 , 15, 430, 30, "", "12pt 'Roboto'", "white");
windowManager.makeText("gameHUD", "time", 225, 40, 75, 30, "%v sec", "12pt 'Roboto'", "white");
windowManager.makeText("gameHUD", "message", 35 , 15, 430, 30, "", "12pt 'Audiowide'", "white");
windowManager.makeText("gameHUD", "time", 225, 40, 75, 30, "%v sec", "12pt 'Audiowide'", "white");
windowManager.toggleUI("gameHUD");
//} end GAME INFO HUD
}
Expand Down

0 comments on commit 70eb9d7

Please sign in to comment.