Пример #1
0
        public bool ExecuteNextAction(ActionQueueList list)
        {
            if (list.Count > 0)
            {
                if (Game.Time > list[0].Time + 1F)
                {
                    list.Remove(list[0]);
                    return(true);
                }

                if (list[0].PreConditionFunc.Invoke())
                {
                    list[0].ComboAction.Invoke();
                }

                if (list[0].ConditionToRemoveFunc.Invoke() || Game.Time > list[0].Time + 0.5F)
                {
                    list.Remove(list[0]);
                    if (list.Count > 0)
                    {
                        var nextItem = list[0];
                        nextItem.Time = Game.Time;
                        list[0]       = nextItem;
                    }
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
        public bool ExecuteNextAction(ActionQueueList list)
        {
            if (list.Count > 0)
            {
                if (Game.Time > list[0].Time + 2F)
                {
                    list.Remove(list[0]);
                    return true;
                }

                if (list[0].PreConditionFunc.Invoke())
                {
                    list[0].ComboAction.Invoke();
                }

                if (list[0].ConditionToRemoveFunc.Invoke() || Game.Time > list[0].Time + 1.5F)
                {
                    list.Remove(list[0]);
                    if (list.Count > 0)
                    {
                        var nextItem = list[0];
                        nextItem.Time = Game.Time;
                        list[0] = nextItem;
                    }
                }
                return true;
            }
            else
            {
                return false;
            }
        }
Пример #3
0
        public bool ExecuteNextAction(ActionQueueList list)
        {
            var rnd = new Random();
            if (list.Count > 0)
            {
                if (Game.Time > list[0].Time + 2F)
                {
                    list.Remove(list[0]);
                    return true;
                }

                if (list[0].PreConditionFunc.Invoke())
                {
                    if (!MenuManager.IDDQD)
                        Core.DelayAction(list[0].ComboAction.Invoke, rnd.Next(50, 125));
                    else
                        list[0].ComboAction.Invoke();

                }

                if (list[0].ConditionToRemoveFunc.Invoke() || Game.Time > list[0].Time + 1.5F)
                {
                    list.Remove(list[0]);
                    if (list.Count > 0)
                    {
                        var nextItem = list[0];
                        nextItem.Time = Game.Time;
                        list[0] = nextItem;
                    }
                }
                return true;
            }
            return false;
        }
Пример #4
0
        public bool ExecuteNextAction(ActionQueueList list)
        {
            var rnd = new Random();

            if (list.Count > 0)
            {
                if (Game.Time > list[0].Time + 2F)
                {
                    list.Remove(list[0]);
                    return(true);
                }

                if (list[0].PreConditionFunc.Invoke())
                {
                    if (!MenuManager.IDDQD)
                    {
                        Core.DelayAction(list[0].ComboAction.Invoke, rnd.Next(50, 125));
                    }
                    else
                    {
                        list[0].ComboAction.Invoke();
                    }
                }

                if (list[0].ConditionToRemoveFunc.Invoke() || Game.Time > list[0].Time + 1.5F)
                {
                    list.Remove(list[0]);
                    if (list.Count > 0)
                    {
                        var nextItem = list[0];
                        nextItem.Time = Game.Time;
                        list[0]       = nextItem;
                    }
                }
                return(true);
            }
            return(false);
        }
Пример #5
0
        public bool ExecuteNextAction(ActionQueueList list)
        {
            if (list.Count > 0)
            {
                if (list[0].PreConditionFunc.Invoke())
                {
                    list[0].ComboAction.Invoke();
                }

                if (list[0].ConditionToRemoveFunc.Invoke() || Game.Time > list[0].Time + 0.75F)
                {
                    list.Remove(list[0]);
                }
                return true;
            }
            else
            {
                return false;
            }
        }
Пример #6
0
        public bool ExecuteNextAction(ActionQueueList list)
        {
            if (list.Count > 0)
            {
                if (list[0].PreConditionFunc.Invoke())
                {
                    list[0].ComboAction.Invoke();
                }

                if (list[0].ConditionToRemoveFunc.Invoke() || Game.Time > list[0].Time + 0.75F)
                {
                    list.Remove(list[0]);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }