ThingPreProcess Event |  |
Hartismere School[This is preliminary documentation and is subject to change.]
Executes before anything else for this Thing.
Namespace: EJW.TextBasedAdventureAssembly: EJW.TextBasedAdventure (in EJW.TextBasedAdventure.dll) Version: 2.0.5850.21153
Syntaxpublic event ProcessHandler PreProcess
Public Event PreProcess As ProcessHandler
public:
event ProcessHandler^ PreProcess {
void add (ProcessHandler^ value);
void remove (ProcessHandler^ value);
}
member PreProcess : IEvent<ProcessHandler,
EventArgs>
Return Value
Type:
The text to display to the user
Examples
To run code before the Thing's main execution block:
Game g = new Game("Demo");
g.Things.Add("torch");
g.Things["Torch"].PreProcess += myPreProcessHandler(Instruction);
string myPreProcessHandler(Instruction i)
{
return "stuff done";
}
See Also