Ejemplo n.º 1
0
 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>();
 }
Ejemplo n.º 2
0
 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>();
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 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);
 }