vaihda fontti
This commit is contained in:
@@ -19,16 +19,16 @@ const CMYK_STEPS = [0, 25, 50, 75, 100]; // helpottaa valintoja
|
|||||||
let clickSound, goodSound, badSound;
|
let clickSound, goodSound, badSound;
|
||||||
let muted = true;
|
let muted = true;
|
||||||
|
|
||||||
|
let font;
|
||||||
|
|
||||||
function preload(){
|
function preload(){
|
||||||
|
|
||||||
// Kevyet piippisoundit (WebAudio, luodaan lennossa)
|
// Kevyet piippisoundit (WebAudio, luodaan lennossa)
|
||||||
|
font = loadFont("FuturaBQ-DemiBold.otf");
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup(){
|
function setup(){
|
||||||
createCanvas(windowWidth, windowHeight);
|
createCanvas(windowWidth, windowHeight);
|
||||||
PFont mono;
|
textFont(font);
|
||||||
mono = createFont("FuturaBQ-DemiBold.otf", 128);
|
|
||||||
textFont(mono);
|
|
||||||
textAlign(CENTER, CENTER);
|
textAlign(CENTER, CENTER);
|
||||||
noStroke();
|
noStroke();
|
||||||
refreshLeaderboard();
|
refreshLeaderboard();
|
||||||
@@ -86,7 +86,7 @@ function drawTitle(){
|
|||||||
textSize(min(width, height) * 0.03);
|
textSize(min(width, height) * 0.03);
|
||||||
text(t2, width/2, height*0.45, width*0.9);
|
text(t2, width/2, height*0.45, width*0.9);
|
||||||
fill(180);
|
fill(180);
|
||||||
text('▶ Aloita – 60 s kierros', width/2, height*0.6);
|
text('Aloita – 60 s kierros', width/2, height*0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawHUD(){
|
function drawHUD(){
|
||||||
@@ -165,7 +165,7 @@ function drawGameOver(){
|
|||||||
textSize(min(width, height) * 0.04);
|
textSize(min(width, height) * 0.04);
|
||||||
text('Pisteesi: ' + score, width/2, height*0.48);
|
text('Pisteesi: ' + score, width/2, height*0.48);
|
||||||
fill(180);
|
fill(180);
|
||||||
text('▶ Aloita uudestaan', width/2, height*0.6);
|
text('Aloita uudestaan painamalla!', width/2, height*0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
function mousePressed(){
|
function mousePressed(){
|
||||||
|
|||||||
Reference in New Issue
Block a user