Exemplo n.º 1
0
 private void UpdateText(NaturalResourcesType type)
 {
     if (type == _type)
     {
         _countText.text = FarmingGameController.CurrentGame.GetNaturalResources(type).Quantity.ToString();
     }
 }
Exemplo n.º 2
0
        public NaturalResourceValue GetNaturalResources(NaturalResourcesType type)
        {
            for (int i = 0; i < _resources.Resources.Count; i++)
            {
                if (_resources.Resources[i].Type == type)
                {
                    return(_resources.Resources[i]);
                }
            }

            return(null);
        }
Exemplo n.º 3
0
        public NaturalResource GetNaturalResource(NaturalResourcesType type)
        {
            for (int i = 0; i < Resources.Count; i++)
            {
                if (type == Resources[i].Value.Type)
                {
                    return(Resources[i]);
                }
            }

            return(null);
        }
    public NaturalResources( NaturalResourcesType t, float amountUn, float amountA = 0,  float access = 1)
    {
        NaturalResourceType = t;
        type = NonShipEntityType.RESOURCE;

        accessibility = access;
        amountAvailable = amountA;
        amountUn = amountUnavailable;

        volumePerUnit = 1;
        massPerUnit = 1;
    }
Exemplo n.º 5
0
 public NaturalResourceValue(NaturalResourcesType type, int quantity)
 {
     _type     = type;
     _quantity = quantity;
 }
Exemplo n.º 6
0
 public NaturalResource(NaturalResourcesType type, int countResources, float price)
 {
     _value     = new NaturalResourceValue(type, countResources);
     _unitPrice = price;
 }