Пример #1
0
    /// <summary>
    /// 無敵状態になる
    /// </summary>
    private async UniTask ChangeStarState(int value)
    {
        audio.PlayOneShot(skill);
        audio2.PlayOneShot(skill2);
        Observable.Timer(TimeSpan.FromSeconds(0.3f))
        .Subscribe(_ => audio3.PlayOneShot(skill3)).AddTo(this);

        isStar = true;
        var startPos = transform.position;

        LeanTween.moveY(this.gameObject, 1.0f, 1.5f).setEaseInOutCubic();
        pp.StarEffect();
        await UniTask.WaitUntil(() => skillExecutor.SkillGauge <= 0);

        Observable.Timer(TimeSpan.FromSeconds(1))
        .Subscribe(_ => isStar = false);
        pp.FinishStar();
        var targetPos = new Vector2(transform.position.x, -3f);

        LeanTween.move(this.gameObject, targetPos, 0.2f).setEaseInOutCubic();
    }