Exemplo n.º 1
0
 public bool CanColonize()
 {
     foreach (ResourceRequirement req in requirements)
     {
         if (manager.GetResourceType(req.type) < req.amount)
         {
             return(false);
         }
     }
     return(true);
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        planetManager = Transform.FindObjectOfType <PlanetManager>();
        planetManager.SetResourceCounter(this);

        for (int i = 0; i < hudEntries.Count; ++i)
        {
            ResourceHUDEntry entry = hudEntries[i];
            entry.text.text  = string.Format("{0:00000}", planetManager.GetResourceType(entry.type));
            entry.img.sprite = planetManager.GetIconForResourceType(entry.type);
        }
    }