예제 #1
0
 public void FreeOneBoi(SmolMan m)
 {
     Debug.Log("Freeing one boi");
     if (m.resourceActive)
     {
         Debug.Log("Resource Active");
         Vertex v = m.getResource();
         Debug.Log(v.getBiome());
         Debug.Log(SphereTerrain.STONE_BIOME);
         if (v.getBiome() == SphereTerrain.WATER_BIOME)
         {
             RemoveGoods("Water", 1);
         }
         if (v.getBiome() == SphereTerrain.STONE_BIOME)
         {
             Debug.Log("Removing Stone");
             RemoveGoods("Stone", 1);
         }
         if (v.getBiome() == SphereTerrain.OIL_BIOME)
         {
             RemoveGoods("Oil", 1);
         }
         if (v.getResource() != null)
         {
             if (v.getResource().name.Contains("Forest"))
             {
                 RemoveGoods("Tree", 1);
             }
             if (v.getResource().name.Contains("Sand"))
             {
                 RemoveGoods("Sand", 1);
             }
             if (v.getResource().name.Contains("Wheat"))
             {
                 RemoveGoods("Wheat", 1);
             }
             if (v.getResource().name.Contains("Iron"))
             {
                 RemoveGoods("Iron", 1);
             }
             if (v.getResource().name.Contains("Copper"))
             {
                 RemoveGoods("Copper", 1);
             }
             if (v.getResource().name.Contains("Coal"))
             {
                 RemoveGoods("Coal", 1);
             }
         }
     }
     busyBois.Remove(m);
     freeBois.Add(m);
     m.findNewBuilding();
 }
예제 #2
0
 private void detachMan()
 {
     if (attachedMan != null)
     {
         Community comm = GameObject.FindObjectOfType <Community>();
         if (comm != null)
         {
             comm.FreeOneBoi(attachedMan);
             attachedMan = null;
         }
     }
 }
예제 #3
0
 public bool MakeBusyBoi()
 {
     Debug.Log("Making busy boi");
     if (IsThereAFreeBoi())
     {
         SmolMan becomingBusy = freeBois[0];
         busyBois.Add(becomingBusy);
         freeBois.RemoveAt(0);
         return(true);
     }
     return(false);
 }
예제 #4
0
 public void attachMan(SmolMan man)
 {
     attachedMan = man;
 }