Exemplo n.º 1
0
 private void Start() // поиск персонажа, определение юнитов и заданий
 {
     if (!inited)
     {
         _dataObject.currentQuest.stateList.ChangeState();
         if (!_dataObject.currentQuest.completed)
         {
             _personController         = FindObjectOfType <PersonController>();
             _personController.blocked = true;
             questController.CreateDialog(_personController.kylePanicSprite, null);
             _dialogCreated = true;
             questController.dialogClosed.AddListener(() =>
             {
                 _personController.blocked = false;
                 inited = true;
                 _dataObject.currentQuest.completed = true;
                 _dataObject.currentQuest           = _dataObject.questList.GetQuest(questController.questType);
                 questController.dialogClosed.RemoveAllListeners();
                 questController.dialogClosed.AddListener(() =>
                 {
                     _personController.SetQuestText(_dataObject.currentQuest);
                     questController.dialogClosed.RemoveAllListeners();
                     _moveFate = true;
                     _fateAnimator.Play("FateWalk");
                     _fateAnimator.transform.rotation = Quaternion.Euler(new Vector3(0, 0, 0));
                 });
             });
         }
     }
 }
 private void Start() // поиск персонажа, определение юнитов и заданий
 {
     if (!inited)
     {
         _dataObject.currentQuest.stateList.ChangeState();
         if (!_dataObject.currentQuest.completed)
         {
             _personController         = FindObjectOfType <PersonController>();
             _personController.blocked = true;
             questController.CreateDialog(_personController.kylePanicSprite, null);
             _dialogCreated = true;
             questController.dialogClosed.AddListener(() =>
             {
                 _personController.blocked = false;
                 inited = true;
                 questController.dialogClosed.RemoveAllListeners();
             });
         }
     }
 }
Exemplo n.º 3
0
    IEnumerator Start() // поиск персонажа, определение юнитов и заданий
    {
        if (inited)
        {
            yield return(null);
        }
        else
        {
            _personController         = FindObjectOfType <PersonController>();
            _personController.blocked = true;
            yield return(new WaitForSeconds(2));

            _dataObject.currentQuest = _dataObject.questList.GetQuest(questController.questType);
            questController.CreateDialog(_personController.kylePanicSprite, _personController.robotSprite);
            dialogCreated = true;
            questController.dialogClosed.AddListener(() =>
            {
                finished = true;
                _personController.blocked = false;
                _personController.SetQuestText(_dataObject.currentQuest);
                inited = true;
            });
        }
    }