-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
executable file
·36 lines (32 loc) · 889 Bytes
/
Event.java
File metadata and controls
executable file
·36 lines (32 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Event Superclass
*
* @author Jimmy, Adrian, Daniel
* @version April 24, 2024
*/
public abstract class Event extends SuperSmoothMover {
private MainWorld mw;
/**
* Act - do whatever the Event wants to do. This method is called whenever the 'Act' or 'Run'
* button gets pressed in the environment.
*/
public void act() {
// Add your action code here.
}
public void addedToWorld(World w) {
mw = (MainWorld) w;
}
/**
* Changes the index of the MainWorld based off of the parameter values
*
* @param SI The value of SI to be changed
* @param EPR The value of EPR to be changed
* @param CWI The value of CWI to be changed
*/
public void changeIndex(int SI, int EPR, int CWI) {
mw.changeSI(SI);
mw.changeEPR(EPR);
mw.changeCWI(CWI);
}
}