/// <summary>
        ///     Initializes a new instance of the <see cref="ChickenPresentation"/> class.
        /// </summary>
        internal ChickenPresentation(GamePresentation gamePresentation, ChickenUnit chickenUnit)
        {
            #region Argument Check

            if (gamePresentation == null)
            {
                throw new ArgumentNullException("gamePresentation");
            }

            if (chickenUnit == null)
            {
                throw new ArgumentNullException("chickenUnit");
            }

            #endregion

            this.GamePresentation = gamePresentation;
            this.UniqueId         = chickenUnit.UniqueId;
            this.Team             = chickenUnit.Team;
            this.KillCount        = chickenUnit.KillCount;

            this.InitialPosition = chickenUnit.Position;
            this.Movement        = chickenUnit.Movement;

            this.InitialBeakAngle = chickenUnit.BeakAngle;
            this.BeakMovement     = chickenUnit.BeakMovement;
        }
示例#2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="GamePaintEventArgs"/> class.
        /// </summary>
        internal GamePaintEventArgs(GamePresentation presentation)
        {
            #region Argument Check

            if (presentation == null)
            {
                throw new ArgumentNullException("presentation");
            }

            #endregion

            this.Presentation = presentation;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="ShotPresentation"/> class.
        /// </summary>
        internal ShotPresentation(GamePresentation gamePresentation, ShotUnit shotUnit)
        {
            #region Argument Check

            if (gamePresentation == null)
            {
                throw new ArgumentNullException("gamePresentation");
            }

            if (shotUnit == null)
            {
                throw new ArgumentNullException("shotUnit");
            }

            #endregion

            this.GamePresentation = gamePresentation;
            this.UniqueId         = shotUnit.UniqueId;
            this.OwnerTeam        = shotUnit.Owner.Team;

            this.InitialPosition = shotUnit.Position;
            this.Movement        = shotUnit.Movement;
        }