コード例 #1
0
        /// <summary>
        /// This function will determine if a Player meets the requirements to produce a Building.
        /// </summary>
        /// <param name="player">Playe being tested.</param>
        /// <param name="bstats">BuildingStats defining the Building.</param>
        /// <returns>true if the player meets the requirements, false if the player does not.</returns>
        public bool playerMeetsRequirements(Player.Player player, BuildingStats bstats)
        {
            ReqList reqList = buildingReqs[bstats];

            return(reqList.playerMeetsReqs(player));
        }
コード例 #2
0
        /// <summary>
        /// This function will deterimine if a Player meets the requirements to produce a Unit.
        /// </summary>
        /// <param name="player">Player being tested</param>
        /// <param name="ustats">UnitStats defining the Unit</param>
        /// <returns>true if the player meets the requirements, false if the player does not.</returns>
        public bool playerMeetsRequirements(Player.Player player, UnitStats ustats)
        {
            ReqList reqList = unitReqs[ustats];

            return(reqList.playerMeetsReqs(player));
        }