Artemis.Engine.TimeableObject.InternalUpdate C# (CSharp) Method

InternalUpdate() private method

private InternalUpdate ( ) : void
return void
        internal override void InternalUpdate()
        {
            base.InternalUpdate();

            UpdateTime();

            if (UseHeavyInvocationLoadHandling)
            {
                throw new NotImplementedException(
                    "Support for heavy invocation load handling is not yet implemented.");
            }
            else
            {
                var toRemove = new List<TimedInvocation>();
                foreach (var invocation in timedInvocations)
                {
                    if ((invocation.UsingFrames && ElapsedFrames - invocation.StartFrame >= invocation.Frames) ||
                        (ElapsedTime - invocation.StartTime >= invocation.Milliseconds))
                    {
                        invocation.Action();
                        toRemove.Add(invocation);
                    }
                }

                foreach (var invocation in toRemove)
                {
                    timedInvocations.Remove(invocation);
                }
            }
        }