Skip to content

Commit

Permalink
finish level fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheExploration committed May 16, 2023
1 parent 0763574 commit f2bca8f
Show file tree
Hide file tree
Showing 8 changed files with 276 additions and 219 deletions.
Binary file modified FixOrder.class
Binary file not shown.
3 changes: 0 additions & 3 deletions FixOrder.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ public void act() {
deltaTime = (currentFrame - lastFrame) / 1000000;
if (deltaTime > delayTime) {
level.fixOrder();
if (level.wave == -1) {
level.finishedSending = true;
}



Expand Down
Binary file modified WaveManager.class
Binary file not shown.
1 change: 1 addition & 0 deletions WaveManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void act()
lastFrame = System.nanoTime();
}
if (wave > level.length-1) {
MyWorld.addObject(new finishedSending(this, 15000L), 0,0);
wave = -1;
}

Expand Down
Binary file added finishedSending.class
Binary file not shown.
8 changes: 8 additions & 0 deletions finishedSending.ctxt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#BlueJ class context
comment0.target=finishedSending
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Timer2\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
comment1.params=level\ delayTime
comment1.target=finishedSending(WaveManager,\ long)
comment2.params=
comment2.target=void\ act()
numComments=3
37 changes: 37 additions & 0 deletions finishedSending.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

import greenfoot.*;

/**
* Write a description of class Timer2 here.
*
* @author (your name)
* @version (a version number or a date)
*/
class finishedSending extends Actor
{
public long deltaTime;
public long lastFrame = System.nanoTime();
public long currentFrame = System.nanoTime();
public long delayTime;

public WaveManager level;

finishedSending(WaveManager level, long delayTime) {
this.delayTime = delayTime;


this.level = level;
}
public void act() {
currentFrame = System.nanoTime();
deltaTime = (currentFrame - lastFrame) / 1000000;
if (deltaTime > delayTime) {

level.finishedSending = true;
getWorld().removeObject(this);
return;
}


}
}
Loading

0 comments on commit f2bca8f

Please sign in to comment.