Replaced raw unicode with String.fromCharCode()

This commit is contained in:
meadowstream 2014-07-03 16:39:29 -04:00
parent c1e5617f9a
commit 1ebf854153
2 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ function Clock(sideLength) {
this.y = trueCanvas.height / 2; this.y = trueCanvas.height / 2;
this.ct = 0; this.ct = 0;
this.lastCombo = this.ct - settings.comboMultiplier; this.lastCombo = this.ct - settings.comboMultiplier;
this.lastColorScored = "#000"; this.lastColorScored = "#000";
this.comboMultiplier = 1; this.comboMultiplier = 1;
this.texts = []; this.texts = [];
@ -42,7 +42,7 @@ function Clock(sideLength) {
}; };
this.addBlock = function(block) { this.addBlock = function(block) {
if (!(gameState == 1 || gameState == 0)) return; if (!(gameState == 1 || gameState === 0)) return;
block.settled = 1; block.settled = 1;
block.tint = 0.6; block.tint = 0.6;
var lane = this.sides - block.fallingLane;// -this.position; var lane = this.sides - block.fallingLane;// -this.position;

View file

@ -84,13 +84,13 @@ function drawKey(key, x, y) {
ctx.rotate(3.14159); ctx.rotate(3.14159);
ctx.font = "20px Fontawesome"; ctx.font = "20px Fontawesome";
ctx.scale(settings.scale, settings.scale); ctx.scale(settings.scale, settings.scale);
ctx.fillText("", 0, 0); ctx.fillText(String.fromCharCode("0xf04b"), 0, 0);
break; break;
case "right": case "right":
ctx.font = "20px Fontawesome"; ctx.font = "20px Fontawesome";
ctx.translate(x + settings.scale * 12.5, y + settings.scale * 27.5); ctx.translate(x + settings.scale * 12.5, y + settings.scale * 27.5);
ctx.scale( settings.scale, settings.scale); ctx.scale( settings.scale, settings.scale);
ctx.fillText("", 0, 0); ctx.fillText(String.fromCharCode("0xf04b"), 0, 0);
break; break;
default: default: