public void removeResidential(GameObject removeObject)
    // Removes residential building
    {
        Debug.Log("Removing...");
        ResidentialTracker temp = removeObject.GetComponent <ResidentialTracker>();

        EconomyManager.ecoTick -= temp.UpdateSecond;
        residentialCap         -= removeObject.GetComponent <ResidentialTracker>().GetCapacity();
        temp.RemoveAllUsers();
        populationManager.DeallocateUsers(temp.users, "residential");
        numResidential--;
        residential.Remove(removeObject);
    }
Example #2
0
 protected void RemoveUsers(int numUsers)
 // Returns unallocated users to the populationManager
 {
     if (gameObject.tag == "residential")
     {
         populationManager.DeallocateUsers(numUsers, type);
         users -= numUsers;
     }
 }