Esempio n. 1
0
 public void AddNewRoom(RoomType room_type, int grid_y, int grid_x)
 {
     if (IncomeManager.incomeInventoryAmount > 100)
     {
         IncomeManager.Payment(100);
         GameObject obj  = grid_list[grid_y][grid_x];
         GridObject grid = obj.GetComponent <GridObject>();
         grid.type = room_type;
         grid.SetRoomValues();
         built_rooms.Add(grid);
         CheckForAvaliableCharacterCreation();
         playerManager.SetCharactersText();
     }
 }
Esempio n. 2
0
    private void FinishProject(int indexProject, GameObject inProgressWindow)
    {
        projectManager._projects[indexProject].inProgress = false;

        foreach (var person in projectManager._projects[indexProject]._currentPeople)
        {
            _playerManager.players[person].avaliableForWork = true;
        }

        projectManager._projects[indexProject]._currentPeople.Clear();
        projectManager._gridGenerator.grid_list[projectManager._projects[indexProject].assignedRoom.x][projectManager._projects[indexProject].assignedRoom.y].GetComponent <GridObject>().isAvailable =
            true;
        projectManager.FindAvailableProjects();

        IncomeManager.Payment(projectManager._projects[indexProject].Income);
        Destroy(inProgressWindow);
        Destroy(gameObject);
    }