Click or drag to resize
ThingPreProcess Event
Hartismere School

[This is preliminary documentation and is subject to change.]

Executes before anything else for this Thing.

Namespace: EJW.TextBasedAdventure
Assembly: EJW.TextBasedAdventure (in EJW.TextBasedAdventure.dll) Version: 2.0.5850.21153
Syntax
public event ProcessHandler PreProcess

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)
{
    //do stuff
    return "stuff done";
}
See Also