private void InitLodCollection(out IVersionedCollection <IIndicator>[] lodCollection) { lodCollection = new IVersionedCollection <IIndicator> [DrawLayers.Length]; for (int i = 0; i < lodCollection.Length; ++i) { lodCollection[i] = new VersionedCollection <IIndicator>(new HashSet <IIndicator>()); } }
public AgentBase(string agentType, IIndicatorProvider indicatorProvider) { AgentType = agentType; Position = new Vector2(0.0f); Indicators = indicatorProvider.CreateIndicatorCollection(); _modifiers = new VersionedCollection <IModifier>(new SimpleSortedList <IModifier>(StatModelComparer)); _labels = new VersionedCollection <ILabel>(new HashSet <ILabel>()); _commands = new VersionedCollection <IAgentCommand>(new HashSet <IAgentCommand>()); _stats = new BaseStatsModel(); }
public MapTileModel(HexCoords coords, IConfig config, IIndicatorProvider indicatorProvider) { Coords = coords; _agents = new VersionedCollection <IExtendedAgent>(new HashSet <IExtendedAgent>()); // copy down config var radius = config.GetFloat(CoreConfig.TileRadius); // calculate position var radiusH = HexUtils.GetRadiusHeight(radius); var x = Coords.Column * (radius + radius * HexUtils.COS60); var y = ((Coords.Column & 1) * radiusH) + ((Coords.Row - (Coords.Column & 1)) * 2 * radiusH); Position = new Vector2(x, y); Indicators = indicatorProvider.CreateIndicatorCollection(); }