Esempio n. 1
0
        public TSVeinsRenderer(Actor self, TSVeinsRendererInfo info)
        {
            this.info = info;
            world     = self.World;

            resourceLayer              = self.Trait <IResourceLayer>();
            resourceLayer.CellChanged += AddDirtyCell;
            maxDensity = resourceLayer.GetMaxDensity(info.ResourceType);

            renderIndices = new CellLayer <int[]>(world.Map);
            borders       = new CellLayer <Adjacency>(world.Map);
        }
Esempio n. 2
0
 public void Do()
 {
     foreach (var resourceCell in cellResources)
     {
         resourceLayer.ClearResources(resourceCell.Cell);
         resourceLayer.AddResource(resourceCell.NewResourceType, resourceCell.Cell, resourceLayer.GetMaxDensity(resourceCell.NewResourceType));
     }
 }