bremsen, level state reset

This commit is contained in:
Maximilian Ruhm 2023-12-22 14:03:47 +01:00
parent 3e56813b04
commit e7940aa125
3 changed files with 8 additions and 4 deletions

View File

@ -126,7 +126,7 @@ void setup() {
music.loop(1, 0.5);
}
// Chris
// Chris, Max
void draw() {
// time debug
// println(millis(), " start: ", playtime.startTime, " pause: ", playtime.pauseTime);
@ -181,6 +181,8 @@ void draw() {
ship_zero.pos.y = height/2;
bob.is_attached = false;
saw_zero.is_attached = false;
create_level(30);
ship_zero.hasSaw = false;
// save

View File

@ -1,4 +1,4 @@
// Julia
// Julia, Max
// Outside wall
Log[] walls = {new Log(-30, 275, 40, 275, false, true), new Log(-30, 600, 40, 275, false, true)};
@ -7,7 +7,7 @@ void create_level(int logcount) {
logs = new Log[logcount];
randomSeed((int)random(0, 30));
for (int i = 1; i < logs.length; i++) {
logs[i] = new Log((int) random(0, width), (int) random(0, height), 20, 60 + random(0, 40), true, false);
logs[i] = new Log((int) random(20, width), (int) random(0, height), 20, 60 + random(0, 40), true, false);
}
// 2nd slide entry
logs[0] = new Log(-15, 325, 10, 50, false, true);

View File

@ -100,8 +100,10 @@ class Ship {
if(NORTH) {
speed.add(acceleration);
speed.limit(1.3);
} else if (SOUTH) {
speed.mult(0.80);
} else { // decrease it if not
speed.mult(0.95);
speed.mult(0.90);
}