示例#1
0
 /// <summary>
 /// Gets the quadratic position of the given addon type relative to the top-left quadratic tile of this building type.
 /// </summary>
 /// <param name="map">The map that is used for the calculations.</param>
 /// <param name="addonType">The addon type whose relative quadratic position to retrieve.</param>
 /// <returns>The quadratic position of the given addon type relative to the top-left quadratic tile of this building type.</returns>
 /// <exception cref="ArgumentException">
 /// If this building type is not defined as the main building for the given addon type.
 /// </exception>
 public RCIntVector GetRelativeAddonPosition(IMapAccess map, IAddonType addonType)
 {
     return(this.implementation.GetRelativeAddonPosition(map, addonType.AddonTypeImpl));
 }
示例#2
0
 /// <summary>
 /// Checks whether the constraints of this building type allows placing a building of this type together with an addon of the given addon type
 /// to the given scenario at the given quadratic position and collects all the violating quadratic coordinates
 /// relative to the given position.
 /// </summary>
 /// <param name="scenario">Reference to the given scenario.</param>
 /// <param name="position">The position to be checked.</param>
 /// <param name="addonType">The addon type to be checked.</param>
 /// <param name="entitiesToIgnore">
 /// The list of entities to be ignored during the check. All entities in this list shall belong to the given scenario.
 /// </param>
 /// <returns>
 /// The list of the quadratic coordinates (relative to the given position) violating the placement constraints of this building type.
 /// </returns>
 /// <exception cref="ArgumentException">
 /// If this building type is not defined as the main building for the given addon type.
 /// </exception>
 public RCSet <RCIntVector> CheckPlacementConstraints(Scenario scenario, RCIntVector position, IAddonType addonType, RCSet <Entity> entitiesToIgnore)
 {
     return(this.implementation.CheckPlacementConstraints(scenario, position, addonType.AddonTypeImpl, entitiesToIgnore));
 }