Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ArenaTimeout:IAction
- {
- public ArenaTimeout(UpdateList _owner, uint _timeout, bool _expires = true)
- {
- Owner = _owner;
- Expires = _expires;
- Timeout = _timeout;
- Trigger = Finished;
- //If it required input we would do something like...
- //Trigger = new Action(() => Finished(true));
- }
- UpdateList Owner;
- public bool Expires;
- public uint Timeout {get;set;}
- Action Trigger;
- //We've satisfied the IAction interface now anything else is just extra convenience
- public void Finished()
- {
- //Execute completion code
- if(Expires)
- Owner.Remove(this);
- }
- }
Add Comment
Please, Sign In to add comment