public HUDSequenceElementOperation(IHUDElementOperation op1, params IHUDElementOperation[] ops) { opQueue.Enqueue(op1); foreach (var op in ops) { opQueue.Enqueue(op); } actionStart = null; actionEnd = null; }
protected override void OnStart(TElement element) { actionStart?.Invoke(element); if (current == null) { if (opQueue.Count == 0) { return; } current = opQueue.Dequeue(); current.OnStart(element); } }
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); }
public HUDDelayedElementOperation(IHUDElementOperation op, float delay) { _offset = delay; _operation = op; }
public void AddHUDOperation(IHUDElementOperation op) { ActiveOperations.Add(op); op.OnStart(this); }
public HUDSequenceElementOperation(Action <TElement> aInit, Action <TElement> aFinal, IHUDElementOperation op1, params IHUDElementOperation[] ops) { opQueue.Enqueue(op1); foreach (var op in ops) { opQueue.Enqueue(op); } actionStart = aInit; actionEnd = aFinal; }