Skip to content

Commit

Permalink
Intro export fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnicJelle authored Dec 2, 2021
2 parents ef2bc51 + 3312ad3 commit 64218a3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ application.macosx
*.blend1
*.png~
*.kra~
Afterparty_win64(no-intro).zip
Afterparty_win64.zip
66 changes: 49 additions & 17 deletions CMGT_PointAndClick.pde
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ void setup() {
//dishes task
Collectable[] dishesCollectables = new Collectable[] { plate1, plate2, plate3, plate4, plate5 };
String[] dishesPileStates = new String[] {
"piles/dishes/state0empty.png",
"piles/dishes/state1.png",
"piles/dishes/state2.png",
"piles/dishes/state3.png",
"piles/dishes/state4.png",
"piles/dishes/state0empty.png",
"piles/dishes/state1.png",
"piles/dishes/state2.png",
"piles/dishes/state3.png",
"piles/dishes/state4.png",
"piles/dishes/state5.png"};
MoveToSceneObject startDishArrow = new MoveToSceneObject("startDishArrow", 508, 549, "rooms/livingRoom/counterDirtyStart.png", "taskDish");
RequireObject requireSponge = new RequireObject("requireSponge", 508, 549, "rooms/livingRoom/counterDirty.png", "Wash the dishes with a sponge!", sponge, (GameObject)startDishArrow);
Expand Down Expand Up @@ -509,10 +509,10 @@ void setup() {
//folding task
Collectable[] foldingCollectables = new Collectable[] { clothes1, clothes2, clothes3, clothes4 };
String[] foldingPileStates = new String[] {
"piles/clothes/state0empty.png",
"piles/clothes/state1.png",
"piles/clothes/state2.png",
"piles/clothes/state3.png",
"piles/clothes/state0empty.png",
"piles/clothes/state1.png",
"piles/clothes/state2.png",
"piles/clothes/state3.png",
"piles/clothes/state4.png"};
MoveToSceneObject foldingTask = new MoveToSceneObject("goToFoldingTask", 777.6, 511.2, "piles/clothes/state4start.png", "TaskFolding");
RequireObject startFolding = new RequireObject("startFolding", 777.6, 511.2, foldingPileStates, "Bring all clothes here", foldingCollectables, (GameObject)foldingTask);
Expand Down Expand Up @@ -559,7 +559,7 @@ void setup() {

//try {
// sceneManager.goToScene("taskDish");
//}
//}
//catch(Exception e) {
// println(e);
//}
Expand Down Expand Up @@ -627,12 +627,12 @@ void draw() {
image(canvas, 0, 0, width, height);
}

if (debugMode) {
if (debugMode) {
text(frameRate, 10, 10);
text(score + "/" + scoreMax, 10, 40);
text(millisLeft, 10, 70);
text(sndTheme1.isPlaying() ? "1playing" : "1not", 10, 100);
text(sndTheme2.isPlaying() ? "2playing" : "2not", 10, 130);
text(sndTheme1.isPlaying() ? "1playing" : "1not", 10, 100);
text(sndTheme2.isPlaying() ? "2playing" : "2not", 10, 130);
text(sndTheme3.isPlaying() ? "3playing" : "3not", 10, 160);
}

Expand All @@ -642,7 +642,7 @@ void draw() {
void endGame() {
try {
sceneManager.goToScene("endscreen");
}
}
catch (Exception e) {
println(e);
}
Expand All @@ -662,7 +662,39 @@ void exit() {
String strDate = sdfDate.format(now);
saveTable(analyticsTable, "analytics/" + strDate + ".csv");
}
surface.setVisible(false);
try {
introVideo.stop();
sndTheme1.stop();
sndTheme2.stop();
sndTheme3.stop();

sfxBroom1.stop();
sfxBroom2.stop();
sfxClosingCloset.stop();
sfxDoorOpen1.stop();
sfxDoorOpen2.stop();
sfxPing.stop();
sfxFolding1.stop();
sfxFolding2.stop();
sfxOpenCloset.stop();
sfxSponge1.stop();
sfxSponge2.stop();
sfxTrash1.stop();
sfxTrash2.stop();
sfxTrash3.stop();
sfxTrash4.stop();
sfxUnlockPhone.stop();
sfxVacuumRunning.stop();
sfxVacuumStart.stop();
sfxVacuumStop.stop();
sfxWakeUp.stop();
}
catch (Exception e) {
e.printStackTrace();
}
super.exit();
//System.exit(0);
}

void mouseMoved() {
Expand Down Expand Up @@ -787,7 +819,7 @@ int textHeight(String str, int specificWidth, int leading) {
// anything with length 0 ignore and increment empty line count
if (paragraphs[i].length() == 0) {
numberEmptyLines++;
} else {
} else {
numTextLines++;
// word wrap
String[] wordsArray = split(paragraphs[i], " ");
Expand Down Expand Up @@ -827,8 +859,8 @@ void setCursor(PImage p) {
}

boolean inGame() {
return !(sceneManager.getCurrentScene() instanceof Task
|| sceneManager.getCurrentScene() instanceof MainMenu
return !(sceneManager.getCurrentScene() instanceof Task
|| sceneManager.getCurrentScene() instanceof MainMenu
|| sceneManager.getCurrentScene() instanceof IntroVideoScene
|| sceneManager.getCurrentScene() instanceof EndScreen);
}
Expand Down
2 changes: 1 addition & 1 deletion data/highscores.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
score,name,time
1370498,TechnicJelle,2021/11/25 14:25
1375808,TechnicJelle,2021/12/02 14:21

0 comments on commit 64218a3

Please sign in to comment.