Replaced raw unicode with String.fromCharCode()
This commit is contained in:
parent
c1e5617f9a
commit
1ebf854153
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue