Exemplo n.º 1
0
        /// <summary>
        /// Creates instance of the Fight. Also selects both (attacker and deffender) group and start fight.
        /// </summary>
        /// <param name="attackers">The attacking group (complete)</param>
        /// <param name="deffendersM">The deffending movable group (complete)</param>
        /// <param name="deffendersS">The deffending staic group (complete)</param>
        public Fight(GroupMovables attackers, GroupMovables deffendersM, GroupStatics deffendersS)
        {
            groupAttackers = attackers;
            movingDict = new Dictionary<IMovableGameObject, IGameObject>();
            damageCounter = new DamageCounter();

            imgoDeffenders = deffendersM;
            isgoDeffenders = deffendersS;

            attackerTarget = new Property<IGameObject>(deffendersM[0]);
            deffenderTarget = new Property<IGameObject>(attackers[0]);

            StartFight();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates instance of the Fight. Also selects both (attacker and deffender) group and starts the fight.
        /// </summary>
        /// <param name="attackers">The attacking group (complete)</param>
        /// <param name="deffendersM">The deffending movable group (complete)</param>
        /// <param name="deffendersS">The deffending staic group (complete)</param>
        public Fight(GroupMovables attackers, GroupMovables deffendersM, GroupStatics deffendersS)
        {
            groupAttackers = attackers;
            movingDict     = new Dictionary <IMovableGameObject, IGameObject>();
            damageCounter  = new DamageCounter();

            imgoDeffenders = deffendersM;
            isgoDeffenders = deffendersS;

            attackerTarget  = new Property <IGameObject>(deffendersM[0]);
            deffenderTarget = new Property <IGameObject>(attackers[0]);

            StartFight();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates instance of the Fight and collect all defenders on shout distance. Also selects both (attacker
        /// and deffender) group and start fight.
        /// </summary>
        /// <param name="attackers">The attacking group (complete)</param>
        /// <param name="deffender">The deffending group (uncomplete - Shout)</param>
        public Fight(GroupMovables attackers, IGameObject deffender)
        {
            groupAttackers = attackers;
            movingDict = new Dictionary<IMovableGameObject, IGameObject>();
            damageCounter = new DamageCounter();

            var objectsInShoutDistance = new List<IGameObject>();
            objectsInShoutDistance.Add(deffender);
            deffender.Shout(objectsInShoutDistance);
            imgoDeffenders = Game.GroupManager.CreateSelectedGroupMovable(objectsInShoutDistance);
            isgoDeffenders = Game.GroupManager.CreateSelectedGroupStatic(objectsInShoutDistance);

            attackerTarget = new Property<IGameObject>(deffender);
            deffenderTarget = new Property<IGameObject>(attackers[0]);

            StartFight();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates instance of the Fight and collects all defenders at a shout distance. Also selects both (attacker
        /// and deffender) group and starts the fight.
        /// </summary>
        /// <param name="attackers">The attacking group (complete)</param>
        /// <param name="deffender">The deffending group (uncomplete - Shout)</param>
        public Fight(GroupMovables attackers, IGameObject deffender)
        {
            groupAttackers = attackers;
            movingDict     = new Dictionary <IMovableGameObject, IGameObject>();
            damageCounter  = new DamageCounter();

            var objectsInShoutDistance = new List <IGameObject>();

            objectsInShoutDistance.Add(deffender);
            deffender.Shout(objectsInShoutDistance);
            imgoDeffenders = Game.GroupManager.CreateSelectedGroupMovable(objectsInShoutDistance);
            isgoDeffenders = Game.GroupManager.CreateSelectedGroupStatic(objectsInShoutDistance);

            attackerTarget  = new Property <IGameObject>(deffender);
            deffenderTarget = new Property <IGameObject>(attackers[0]);

            StartFight();
        }