Beispiel #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));
        }
Beispiel #2
0
        protected override void OnStart(TElement element)
        {
            actionStart?.Invoke(element);

            if (current == null)
            {
                if (opQueue.Count == 0)
                {
                    return;
                }

                current = opQueue.Dequeue();
                current.OnStart(element);
            }
        }
Beispiel #3
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);
        }
Beispiel #4
0
		public void AddHUDOperation(IHUDElementOperation op)
		{
			ActiveOperations.Add(op);
			op.OnStart(this);
		}