Exemplo n.º 1
0
    public ResourceDeposit(ResourceStockpile.ResourceType type, Size size)
    {
        this.type = type;
        this.size = size;
        switch (size) // Add in configuration file system to change the hard-coded values
        {
        case Size.Small:
            startingSize = 200;
            break;

        case Size.Medium:
            startingSize = 500;
            break;

        case Size.Large:
            startingSize = 1000;
            break;

        case Size.Huge:
            startingSize = 2000;
            break;
        }
    }
Exemplo n.º 2
0
        public void AddDeposits(ResourceStockpile.ResourceType type, int number)
        {
            int randomSize;

            ResourceDeposit.Size size;

            for (int i = 0; i < number; i++)
            {
                randomSize = UnityEngine.Random.Range(0, 3);

                switch (randomSize)
                {
                case 0:
                    size = ResourceDeposit.Size.Small;
                    break;

                case 1:
                    size = ResourceDeposit.Size.Medium;
                    break;

                case 2:
                    size = ResourceDeposit.Size.Large;
                    break;

                case 3:
                    size = ResourceDeposit.Size.Huge;
                    break;

                default:
                    size = ResourceDeposit.Size.Medium;
                    break;
                }

                AddDeposit(type, size);
            }
        }
Exemplo n.º 3
0
 public void AddDeposit(ResourceStockpile.ResourceType type, ResourceDeposit.Size size)
 {
     deposits.Add(new ResourceDeposit(type, size));
 }