|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IDelegate
A section of code that implements game logic. The delegate should be deterministic. All random events should be obtained through calls to the delegateBridge. Delegates make changes to gameData by calling the addChange method in DelegateBridge. All delegates must have a zero argument constructor, due to reflection constraints. The delegate will be initialized with a call of initialize(..) before used. Delegates start executing with the start method, and stop with the end message. Delegates can be made accesseble to players through implementing an IRemote, and will be called through RemoteMessenger.
| Method Summary | |
|---|---|
void |
end()
Called before the delegate will stop running. |
java.lang.String |
getDisplayName()
|
java.lang.String |
getName()
|
java.lang.Class<? extends IRemote> |
getRemoteType()
Get the remote type of this delegate for use by a RemoteMessenger. |
void |
initialize(java.lang.String name,
java.lang.String displayName)
|
void |
loadState(java.io.Serializable state)
Loads the delegates state |
java.io.Serializable |
saveState()
Returns the state of the Delegate. |
void |
start(IDelegateBridge aBridge,
GameData gameData)
Called before the delegate will run. |
| Method Detail |
|---|
void initialize(java.lang.String name,
java.lang.String displayName)
void start(IDelegateBridge aBridge,
GameData gameData)
void end()
java.lang.String getName()
java.lang.String getDisplayName()
java.io.Serializable saveState()
void loadState(java.io.Serializable state)
java.lang.Class<? extends IRemote> getRemoteType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||