// Entry with controller state Validated or in a running state after a game load // Exit with InitializationError (false) on error // Ok (true) if ready for game play // Hybernating (true) if system is ok and no frame updates are required public virtual bool Initialize() { // Default class method for sub-classes which don't require initialization strReturn = string.Empty; State = SubControllerState.Ok; return(true); }
// Entry with controller state Uninitialized // Exit with ValidationError (false) on error // Validated (true) if ready for initialization public virtual bool Validate() { // Default class method for sub-classes which don't require validation strReturn = string.Empty; State = SubControllerState.Validated; return(true); }
// Entry with controller state Ok // Executes every frame during game play // Exit with RuntimeError (false) on error // Ok (true) if ready for game play // Hybernating (true) if system is ok and no further frame updates are required public virtual bool Update() { // Default class method for sub-classes which don't require updating strReturn = string.Empty; State = SubControllerState.Hybernating; return(true); }
// Entry with controller state Validated or in a running state after a game load // Exit with InitializationError (false) on error // Ok (true) if ready for game play // Hybernating (true) if system is ok and no frame updates are required public virtual bool Initialize() { // Default class method for sub-classes which don't require initialization strReturn = string.Empty; State = SubControllerState.Ok; return true; }
// Start in an uninitialized state internal SubController() { strReturn = string.Empty; State = SubControllerState.Uninitialized; Hash = this.GetHashCode() & 0xFFFFF; }
// Entry with controller state Uninitialized // Exit with ValidationError (false) on error // Validated (true) if ready for initialization public virtual bool Validate() { // Default class method for sub-classes which don't require validation strReturn = string.Empty; State = SubControllerState.Validated; return true; }
// Entry with controller state Ok // Executes every frame during game play // Exit with RuntimeError (false) on error // Ok (true) if ready for game play // Hybernating (true) if system is ok and no further frame updates are required public virtual bool Update() { // Default class method for sub-classes which don't require updating strReturn = string.Empty; State = SubControllerState.Hybernating; return true; }