incase even is too sloow

This commit is contained in:
rsninja722 2020-04-20 20:19:16 -04:00
parent db2fd2d3ed
commit 22e30696b0
11 changed files with 32 additions and 1 deletions

View File

@ -29,6 +29,12 @@ function updateCutScene() {
vel += 0.1;
}
}
if(cutTime===52) {
soundAssets.crack.play();
}
if(cutTime===140) {
soundAssets.crash.play();
}
if (cutTime >= 500) {
globalState = globalStates.titleScreen;
titleScreenState = "credits";

View File

@ -53,6 +53,11 @@ function updateLife() {
}
pressure -= 0.1;
if(~~(pressure*10)/10 === 28) {
soundAssets.beep2.play();
} else if(~~(pressure*10)/10 === 42){
soundAssets.beep1.play();
}
if (pressure <= 0) {
pressure = 0;
player.die();
@ -135,6 +140,11 @@ function heartbeat() {
pressure = 100;
player.die();
}
if(pressure>75) {
soundAssets.beep2.play();
} else if(pressure>60){
soundAssets.beep1.play();
}
heartBeat = true;
// Play the heartbeat sound

View File

@ -81,6 +81,7 @@ Player.prototype.update = function() {
this.shouldMoveLeg = true;
this.legSelected = "R";
this.hover.active = false;
soundAssets.selectLeg.play();
}
//left
} else if (distanceToLineSegment(this.leftLeg.x, this.leftLeg.y, this.leftLeg.x2, this.leftLeg.y2, targetPos.x, targetPos.y) < constants.player.select_range) {
@ -93,6 +94,7 @@ Player.prototype.update = function() {
this.shouldMoveLeg = true;
this.legSelected = "L";
this.hover.active = false;
soundAssets.selectLeg.play();
}
} else {
this.hover.active = false;
@ -103,6 +105,7 @@ Player.prototype.update = function() {
if(this.holdingBox && this.x > -275 && this.y < 100) {
this.holdingBox = false;
boxOnTable = true;
soundAssets.clonk.play();
}
// god mode

View File

@ -27,6 +27,12 @@ let soundAssetMap = {
"click": "./assets/sounds/click.mp3",
"hover": "./assets/sounds/hover.wav",
"pickUp": "./assets/sounds/pickUp.wav",
"selectLeg": "./assets/sounds/selectLeg.mp3",
"crash": "./assets/sounds/crash.mp3",
"crack": "./assets/sounds/crack.mp3",
"clonk": "./assets/sounds/clonk.mp3",
"beep1": "./assets/sounds/beep1.wav",
"beep2": "./assets/sounds/beep2.wav",
"backingtrack": "./assets/sounds/backingtrack.wav"
}
@ -47,6 +53,12 @@ let soundAssets = {
click: new SoundSnippet("click", audioAssetType.sfx),
hover: new SoundSnippet("hover", audioAssetType.sfx),
pickUp: new SoundSnippet("pickUp", audioAssetType.sfx),
selectLeg: new SoundSnippet("selectLeg", audioAssetType.sfx),
crash: new SoundSnippet("crash", audioAssetType.sfx),
crack: new SoundSnippet("crack", audioAssetType.sfx),
clonk: new SoundSnippet("clonk", audioAssetType.sfx),
beep1: new SoundSnippet("beep1", audioAssetType.sfx),
beep2: new SoundSnippet("beep2", audioAssetType.sfx),
backingtrack: new SoundSnippet("backingtrack", audioAssetType.bgm)
}

View File

@ -68,7 +68,7 @@ function drawTitleScreen() {
if (titleScreenState === "main") {
img(sprites.backGround, cw / 2, ch / 2);
text("GAME TITLE HERE", 50, 50, "white", 8, 1000);
text("MicroManaged Mike", 100, 70, "white", 6);
// rect(415, 200, 300, 50, "green");
img(sprites["buttonBig" + (rectpoint({ x: 400, y: 200, w: 300, h: 50 }, mousePos) ? "Hover" : "")], 400, 200, 0, 2, 2);
text("Play!", 340, 185, "#403826", 5, 150);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.