/// <summary> /// Releases unmanaged and - optionally - managed resources /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (_children != null) { foreach (IGameComponent child in Children) { child.Dispose(); } _children.Clear(); } if (disposing) { _children = null; ActionProcessor = null; } }
/// <summary> /// Updates the self. /// </summary> /// <param name="elapsedTime">The elapsed time.</param> protected virtual void UpdateSelf(ElapsedTime elapsedTime) { if (ActionProcessor == null) ActionProcessor = new ActionProcessor(UpdateBySteps()); ElapsedTime = elapsedTime; ActionProcessor.Step(elapsedTime); if (ActionProcessor.IsProcessing) return; if (RepeatUpdateSteps) ActionProcessor.Reset(); }