Ejemplo n.º 1
0
        private void ReturnToOffice()
        {
            Team team = DetectiveManager.GetInstantiate().teamOnWait;

            team.GoTo(Agency.GetInstantiate().GetOffice(), team.GetPriorityWay(), true);
            InterfaceManager.GetInstantiate().activitiesPanel.Close();
            Game.GetInstantiate().ChangeGameState(GameState.IN_GAME);
        }
Ejemplo n.º 2
0
        public void Accept()
        {
            DetectiveManager detectiveManager = DetectiveManager.GetInstantiate();
            InterfaceManager interfaceManager = InterfaceManager.GetInstantiate();
            List <QuestTask> tasks            = new List <QuestTask>();

            for (int i = 0; i < tasksPanel.childCount; i++)
            {
                TaskPanel panel = tasksPanel.GetChild(i).GetComponent <TaskPanel>();
                if (panel.taskToggle.isOn)
                {
                    tasks.Add(panel.task);
                }
            }
            if (interfaceManager.activitiesPanel.prevState == GameState.WAIT_ACTIVITY_CHOICE)
            {
                Team team = detectiveManager.teamOnWait;
                team.targetTasks = tasks;
                if (team.startPlace == questEvent)
                {
                    interfaceManager.activitiesPanel.prevState = GameState.IN_GAME;
                    questEvent.AddTeam(team);
                    team.StartTask();
                    interfaceManager.detectiveRow.ResetRow();
                }
                else
                {
                    team.GoTo(questEvent, team.GetPriorityWay(), true);
                    interfaceManager.activitiesPanel.prevState = GameState.IN_GAME;
                }
            }
            else
            {
                List <Detective> detectives = new List <Detective>();
                foreach (Detective detective in _questEvent.plannedDetectivesOnEvent)
                {
                    detectives.Add(detective);
                    _questEvent.potencialDetectivesOnEvent.Add(detective);
                }
                detectiveManager.TeamOnTarget(detectives, questEvent, tasks);
            }
            _questEvent.plannedDetectivesOnEvent.Clear();
        }