Esempio n. 1
0
        /// <summary>
        /// Creates Property with remaining time to the end of the occupation.
        /// This Property is added to occupied object (to objects properties).
        /// </summary>
        /// <param name="occupier">The attacking group.</param>
        /// <param name="occupied">The target of the occupation.</param>
        /// <param name="time">The time of the occupation.</param>
        public Occupation(GroupMovables occupier, IGameObject occupied, TimeSpan time)
        {
            remainingTime = new Property <TimeSpan>(time);

            occupied.AddProperty <TimeSpan>(PropertyEnum.Occupation, remainingTime);
            this.name      = "Occupation of " + occupied.Name;
            this.attackers = occupier;
            this.target    = (IGameObject)occupied;
            // Play occupation sound
            Game.IEffectPlayer.PlayEffect(occStart);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates Property with remaining time to the end of the occupation.
        /// This Property is added to occupied object (to objects properties).
        /// </summary>
        /// <param name="occupier">The attacking group.</param>
        /// <param name="occupied">The target of the occupation.</param>
        /// <param name="time">The time of the occupation.</param>
        public Occupation(GroupMovables occupier, IGameObject occupied, TimeSpan time)
        {
            remainingTime = new Property<TimeSpan>(time);

            occupied.AddProperty<TimeSpan>(PropertyEnum.Occupation, remainingTime);
            this.name = "Occupation of " + occupied.Name;
            this.attackers = occupier;
            this.target = (IGameObject)occupied;
            // Play occupation sound
            Game.IEffectPlayer.PlayEffect(occStart);
        }