public ActionPanelInitDelayedAttackMAP(DeathmatchMap Map, int ActivePlayerIndex, DelayedAttack ActiveDelayedAttack)
     : base(PanelName, Map)
 {
     ActiveSquad              = ActiveDelayedAttack.Owner;
     this.ActivePlayerIndex   = ActivePlayerIndex;
     this.ActiveDelayedAttack = ActiveDelayedAttack;
 }
Example #2
0
        public static void UpdateDelayedAttacks(DeathmatchMap Map, int ActivePlayerIndex)
        {
            for (int A = Map.ListDelayedAttack.Count - 1; A >= 0; --A)
            {
                DelayedAttack ActiveDelayedAttack = Map.ListDelayedAttack[A];

                if (ActiveDelayedAttack.PlayerIndex == ActivePlayerIndex)
                {
                    if (--ActiveDelayedAttack.TurnsRemaining == 0)
                    {
                        Map.ListActionMenuChoice.AddToPanelListAndSelect(new ActionPanelInitDelayedAttackMAP(Map, ActivePlayerIndex, ActiveDelayedAttack));

                        Map.ListDelayedAttack.RemoveAt(A);
                    }
                }
            }
        }