private void UpdateText(NaturalResourcesType type) { if (type == _type) { _countText.text = FarmingGameController.CurrentGame.GetNaturalResources(type).Quantity.ToString(); } }
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); }
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; }
public NaturalResourceValue(NaturalResourcesType type, int quantity) { _type = type; _quantity = quantity; }
public NaturalResource(NaturalResourcesType type, int countResources, float price) { _value = new NaturalResourceValue(type, countResources); _unitPrice = price; }