Exemplo n.º 1
0
    public IEnumerator ToEndStoryCor()
    {
        yield return(new WaitUntil(() => controller.currentStateName == "Idle"));

        yield return(new WaitForSeconds(0.5f));

        var loopBgm = GameObject.Find("LoopBgm").GetComponent <AudioSource>();
        var ad      = ApCtrl.CreateAlphaData(ApCtrl.AudioVolumeAlpha(loopBgm), this);

        ApCtrl.DisappearAlpha(ad, 2);
        controller.enabled  = false;
        controller.Velocity = Vector2.zero;
        var bodyView = controller.GetComponentInChildren <BodyView>();

        bodyView.enabled = false;
        bodyView.SetAnimate("stand", true);
        controller.GetComponentInChildren <SkeletonAnimation>().skeleton.FlipX = false;
        ColorScreen.Main.SetColor(Color.black, 2);
        StartCoroutine(toEndStoryCameraMov());
        yield return(new WaitForSecondsRealtime(2));

        SceneManager.activeSceneChanged += destroySomething;
        SceneManager.LoadScene("EndAnim");
    }
Exemplo n.º 2
0
 public void Start()
 {
     source           = GameObject.Find("Bgm").GetComponent <AudioSource>();
     sourcePriorityAd = ApCtrl.CreateAlphaData(ApCtrl.AudioVolumeAlpha(source), this);
     processCor       = StartCoroutine(process());
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     bgmAd = ApCtrl.CreateAlphaData(ApCtrl.AudioVolumeAlpha(bgm), this);
     StartCoroutine(mainProcess());
     pressKeyCor = StartCoroutine(pressKeyAnim());
 }