Exemplo n.º 1
0
        public override bool Update(TElement entity, SAMTime gameTime, InputState istate)
        {
            if (Lifetime < _offset)
            {
                return(true);
            }

            if (!started)
            {
                _operation.OnStart(entity);
            }

            return(_operation.Update(entity, gameTime, istate));
        }
Exemplo n.º 2
0
        public override bool Update(TElement entity, SAMTime gameTime, InputState istate)
        {
            if (current == null)
            {
                if (opQueue.Count == 0)
                {
                    return(false);
                }

                current = opQueue.Dequeue();
                current.OnStart(entity);
            }

            bool r = current.Update(entity, gameTime, istate);

            if (!r)
            {
                current.OnEnd(entity);
                current = null;
            }

            return(true);
        }