added the constructors for all client states and their statemachines
This commit is contained in:
@@ -1,4 +1,33 @@
|
||||
package pp.mdga.client;
|
||||
|
||||
public abstract class ClientState {
|
||||
public abstract class ClientState implements Observer {
|
||||
protected static final System.Logger LOGGER = System.getLogger(ClientState.class.getName());
|
||||
|
||||
protected ClientState parent;
|
||||
|
||||
protected ClientGameLogic logic;
|
||||
|
||||
protected ClientState(ClientState parent, ClientGameLogic logic){
|
||||
this.parent = parent;
|
||||
this.logic = logic;
|
||||
}
|
||||
|
||||
public void entry(){/* do nothing */}
|
||||
|
||||
public void exit() {/* do nothing*/}
|
||||
|
||||
public void gotoState(ClientState newState){
|
||||
throw new IllegalStateException("not in a statemachine");
|
||||
}
|
||||
|
||||
public ClientState getParent(){
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void update() {/* do nothing */}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user