Esempio n. 1
0
        public void SetAMushroom(FactoryProvider provider, Vector3 relPosition, Island island, System.Random rand)
        {
            var mushroom = GetBasicResource(provider, relPosition, island, rand);

            mushroom.HarvestController.harvestTactic = new SimpleHarvestedControllerTactic(mushroom, InventoryType: inventoryDatabase.BrownMushroom);
            var resourceCount = new Dictionary <InventoryType, int>();

            mushroom.IslandElementViewSettings = new IslandElementViewSettings()
            {
                GetGameObject = () => viewFac.GetBrownMushroomVisualization(rand.Next()), HasLifeStatVisualization = false
            };
            resourceCount[inventoryDatabase.BrownMushroom] = 1;
            mushroom.HarvestInfo = new HarvestInfo(false, false, resourceCount, resourceCount, false, false, true, false);
            mushroom.CircleElementProperties.OriginalRadius = 0.2f;
            mushroom.Size = 1f;
        }
Esempio n. 2
0
 public InventoryDatabase(UnityViewFactory viewFac)
 {
     Wood          = new InventoryType("Wood", 10, false, "This is wood", () => viewFac.GetWoodVisualization());
     Stone         = new InventoryType("Stone", 10, false, "This is stone", () => viewFac.GetStoneVisualization());
     BrownMushroom = new InventoryType("BrownMushroom", 10, false, "This is a brown mushroom", () => viewFac.GetBrownMushroomVisualization(0));
     Grass         = new InventoryType("Grass", 10, false, "This is a bunch o grass", () => viewFac.GetGrassVisualization(0));
 }