Beispiel #1
0
    private IEnumerator InitDependency2()
    {
        yield return(new WaitForSeconds(0.1f));

        ActManager.Instance().Init();
        StartStory();
    }
Beispiel #2
0
    private void StartAct()
    {
        if (CurrentAct != null)
        {
            CurrentAct.GameObject.SetActive(false);
        }

        CurrentAct = ActManager.Instance().GetActObject(
            ActManager.Instance().GetActDict().ElementAt(ActIndex).Key
            );

        Acts.Add(CurrentAct);
        CurrentAct.InitAct(OnActEnd);
        ContinueStory();
    }
Beispiel #3
0
    private void OnActEnd()
    {
        ActIndex++;

        if (ActIndex >= ActManager.Instance().GetActDict().Count)
        {
            return;
        }

        if (_tStyle == TStyle.None)
        {
            StartAct();
        }
        else
        {
            Overlay.Transition(OverlayTransition.Complete, 1f, () => { StartAct(); });
        }

        _tStyle = TStyle.None;
    }
Beispiel #4
0
    void StartStory()
    {
        Acts = new List <IAct>();

        if (string.IsNullOrWhiteSpace(StartAtAct))
        {
            StartAtAct = ActManager.Instance().GetActDict().ElementAt(0).Key;
            ActIndex   = 0;
        }
        else
        {
            if (UsefullUtils.IsDigitsOnly(StartAtAct))
            {
                ActIndex   = System.Convert.ToInt32(StartAtAct);
                StartAtAct = ActManager.Instance().GetActDict().ElementAt(ActIndex).Key;
            }
            else
            {
                ActIndex = System.Array.IndexOf(ActManager.Instance().GetActDict().Keys.ToArray(), StartAtAct);
            }
        }
        Debug.Log(ActIndex);
        StartAct();
    }