public int GetResource(RTSUnit.Type type) { int value; if (!resources.TryGetValue(type, out value)) { return(0); } return(value); }
public FindClosestUnit(RTSUnit.Type type) { this.type = type; }
public void AddResource(RTSUnit.Type type, int amount) { resources[type] = GetResource(type) + amount; }