public Extract(GameObject agent, GameObject resource) : base(agent, TaskType.Extract) { timeFromLastExtraction = 0.0f; stats = agent.GetComponent <Stats>(); yielder = resource.GetComponent <ResourceYielder>(); load = agent.GetComponent <BeeLoad>(); }
public Extract(GameObject agent, GameObject resource) : base(agent, TaskType.Extract) { timeFromLastExtraction = 0.0f; stats = agent.GetComponent<Stats>(); yielder = resource.GetComponent<ResourceYielder>(); load = agent.GetComponent<BeeLoad>(); }
public void SetResourceBPText(ResourceYielder res) { string txt = "Resources left: (yield)\r\n"; foreach (ResourceType type in Enum.GetValues(typeof(ResourceType))) { // The following line is painful to watch; should've been a // !type.IsRaw, but we haven't implemented Nectar yet, so // this is a quick way to discard it too. if (type == ResourceType.Nectar) { break; } txt += "\r\n" + String.Format("{0,-9} {1,-5:D} ({2:D})", type.ToString() + ":", res.Resources[type], res.YieldAmount(type)); } SetBPText(txt); }
public void SetResourceBPText(ResourceYielder res) { string txt = "Resources left: (yield)\r\n"; foreach (ResourceType type in Enum.GetValues(typeof(ResourceType))) { // The following line is painful to watch; should've been a // !type.IsRaw, but we haven't implemented Nectar yet, so // this is a quick way to discard it too. if (type == ResourceType.Nectar) break; txt += "\r\n" + String.Format("{0,-9} {1,-5:D} ({2:D})", type.ToString() + ":", res.Resources[type], res.YieldAmount(type)); } SetBPText(txt); }