private IEnumerator Phase2_Cor()
    {
        //無敵化、移動
        GetComponent <BossCollisionDetection>().Become_Invincible();
        _move.Start_Move(new Vector3(180f, -32f));
        yield return(new WaitUntil(_move.End_Move));

        yield return(new WaitForSeconds(0.5f));

        GetComponent <BossCollisionDetection>().Release_Invincible();

        //初期設定
        _controller.Play_Battle_Effect();

        while (true)
        {
            //自機を追従、鱗粉弾発射
            Start_Trace_Player();
            for (int i = 0; i < 2; i++)
            {
                yield return(new WaitForSeconds(2.2f));

                _controller.StartCoroutine("Pre_Action_Blink");
                _controller.Play_Small_Charge_Effect();
                yield return(new WaitForSeconds(1.0f));

                for (int j = 0; j < 2; j++)
                {
                    shoot_Obj.Shoot_Scales_Bullet((j + 1) * 20, (j + 1) * 150f);
                    _controller.Play_Scales_Effect();
                    yield return(new WaitForSeconds(0.5f));
                }
            }
            yield return(new WaitForSeconds(3.0f));

            Quit_Trace_Player();

            //突進攻撃
            StartCoroutine("Dash_Attack");
            yield return(new WaitForSeconds(4.5f));

            //移動
            _controller.Play_Charge_Effect(2.0f);
            _move.Start_Move(new Vector3(0, 110f));
            yield return(new WaitForSeconds(2.0f));

            //弾幕2
            shoot_Obj.Shoot_Dif_Bullet();
            _controller.Play_Burst_Effect();
            yield return(new WaitForSeconds(1.0f));

            _controller.Play_Burst_Effect();
            shoot_Obj.StartCoroutine("Shoot_Green_Bullet_Cor", 3);
            yield return(new WaitForSeconds(6.0f));

            //移動
            _move.Start_Move(new Vector3(130f, -32f));
            yield return(new WaitUntil(_move.End_Move));
        }
    }
Esempio n. 2
0
    //クリア時の処理
    public IEnumerator Clear_Cor()
    {
        //攻撃中止
        StopCoroutine("Attack_Cor");
        Stop_Charge_Effect();
        //背景戻す
        BackGroundEffector.Instance.Start_Change_Color(new Color(1, 1, 1), 0.1f);
        //移動
        _move_Two_Points.Start_Move(new Vector3(transform.position.x, -110f), 0);
        yield return(new WaitUntil(_move_Two_Points.End_Move));

        GetComponent <Animator>().SetBool("AttackBool", false);
        //アイテム
        transform.GetChild(0).gameObject.SetActive(true);
    }
Esempio n. 3
0
    private IEnumerator Play_Before_Boss_Movie_Cor()
    {
        //初期設定
        player.GetComponent <PlayerController>().Set_Is_Playable(false);
        PauseManager.Instance.Set_Is_Pausable(false);
        is_First_Visit = SceneManagement.Instance.Is_First_Visit();
        BGMManager.Instance.Stop_BGM();

        //自機登場
        MoveTwoPoints player_Move = player.AddComponent <MoveTwoPoints>();

        player_Move.Change_Paramter(0.021f, 0, 0);
        player_Move.Change_Transition_Curve(AnimationCurve.Linear(0, 0, 1, 1), 0);
        player.GetComponent <PlayerController>().Change_Animation("DashBool");
        player_Move.Start_Move(new Vector3(-120f, -83f), 0);
        yield return(new WaitUntil(player_Move.End_Move));

        player.GetComponent <PlayerController>().Change_Animation("IdleBool");

        //会話
        if (is_First_Visit)
        {
            _message.Start_Display("NemunoText", 1, 8);
            yield return(new WaitUntil(_message.End_Message));
        }

        //終了設定
        player.GetComponent <PlayerController>().Set_Is_Playable(true);
        PauseManager.Instance.Set_Is_Pausable(true);

        //戦闘開始
        nemuno.GetComponent <NemunoController>().Start_Battle();
        BGMManager.Instance.Change_BGM("Stage2_Boss");
    }
Esempio n. 4
0
    //会話終了時
    private IEnumerator Action_After_Talking_Cor()
    {
        int rumia = PlayerPrefs.GetInt("Rumia");

        //初回かつルーミアの隣じゃない
        if (talk_Count == 1 && rumia != 2)
        {
            Put_Out_Collection_Box();
            yield break;
        }
        //ルーミア発見済み
        else if (talk_Count > 1 && rumia == 1)
        {
            //当たり判定消す
            GetComponent <BoxCollider2D>().enabled = false;
            //飛び去る
            MoveTwoPoints _move = GetComponent <MoveTwoPoints>();
            _move.Start_Move(transform.position + new Vector3(-300f, 150f));
            GetComponent <Animator>().SetTrigger("FlyTrigger");
            mark_Up_Baloon.SetActive(false);
            //エフェクト消す
            GetComponentInChildren <ParticleSystem>().Stop();
            //アイテムを出す
            Put_Out_Score(15);
            //ルーミアの隣に配置
            yield return(new WaitForSeconds(5.0f));

            GetComponent <BoxCollider2D>().enabled = true;
            Change_Status_With_Rumia();
        }
    }
Esempio n. 5
0
    private IEnumerator Hina_Movie_Cor()
    {
        GameObject       player            = GameObject.FindWithTag("PlayerTag");
        PlayerController player_Controller = player.GetComponent <PlayerController>();
        MoveTwoPoints    _move             = GetComponent <MoveTwoPoints>();
        MessageDisplay   _message          = GetComponent <MessageDisplay>();
        Vector3          default_Pos       = transform.position;

        //操作無効化
        while (!player_Controller.Get_Is_Playable())
        {
            yield return(null);
        }
        player_Controller.Set_Is_Playable(false);
        player_Controller.Change_Animation("IdleBool");
        player.GetComponent <Rigidbody2D>().velocity = new Vector2(0, 0);
        player_Controller.To_Disable_Ride_Beetle();
        PauseManager.Instance.Set_Is_Pausable(false);

        //雛が上から降りてくる
        transform.position = new Vector3(player.transform.position.x + 64f, 250f);
        _move.Start_Move(new Vector3(transform.position.x, 80f));
        yield return(new WaitUntil(_move.End_Move));

        //会話開始
        _message.Start_Display("HinaText", 4, 4);
        yield return(new WaitUntil(_message.End_Message));

        //収集アイテムを落とす
        if (!CollectionManager.Instance.Is_Collected("Hina"))
        {
            collection_Box.gameObject.SetActive(true);
        }

        //元の位置に戻る
        _move.Start_Move(new Vector3(transform.position.x, 250f));
        yield return(new WaitUntil(_move.End_Move));

        transform.position = default_Pos;

        //操作有効か
        player_Controller.Set_Is_Playable(true);
        player_Controller.To_Enable_Ride_Beetle();
        PauseManager.Instance.Set_Is_Pausable(true);
    }
    //サビ
    private IEnumerator Phase1_Melody_Main_Cor(NemunoBGMTimeKeeper _BGM)
    {
        //弾幕前溜め
        _attack_Func.StartCoroutine("High_Jump_Cor", -1);
        yield return(new WaitUntil(_attack_Func.Is_End_Move));

        //サビ開始までの時間を計算
        float wait_Time = _BGM.BGM_Time_Keeper[4] - (Time.unscaledTime - _BGM.Get_BGM_Launch_Time()) % _BGM.BGM_Time_Keeper[5];

        if (wait_Time < 0 || wait_Time > 10)
        {
            wait_Time = 2.0f;
        }

        transform.localScale = new Vector3(1, 1, 1);
        _controller.Play_Charge_Effect(wait_Time);

        //移動
        _controller.Change_Animation("ShootBool");
        _controller.Change_Fly_Parameter();
        yield return(new WaitForSecondsRealtime(1.0f));

        _move_Two_Points.Start_Move(new Vector3(160f, 8f), 4);
        yield return(new WaitForSeconds(wait_Time - 1.0f));

        //弾幕攻撃
        _controller.Play_Burst_Effect();
        _shoot.Start_Kunai_Shoot();
        UsualSoundManager.Instance.Play_Shoot_Sound();
        yield return(new WaitForSeconds(10.0f));

        if (_BGM.Get_Now_Melody() != NemunoBGMTimeKeeper.Melody.main)
        {
            _controller.Change_Land_Paramter();
            _controller.Change_Animation("IdleBool");
            yield return(new WaitForSeconds(1.5f));
        }

        can_Attack = true;
    }
Esempio n. 7
0
    private IEnumerator Battle_Movie_Cor()
    {
        GameObject       camera            = GameObject.FindWithTag("MainCamera");
        MoveTwoPoints    camera_Move       = camera.GetComponent <MoveTwoPoints>();
        CameraController camera_Controller = camera.GetComponent <CameraController>();

        //カメラの移動、固定
        camera_Controller.enabled = false;
        camera_Move.Start_Move(new Vector3(3312f, 0, -10));
        yield return(new WaitUntil(camera_Move.End_Move));

        //戦闘開始
        big_Frog.Start_Battle();
        boss_Canvas.SetActive(true);
    }
    //ボス前ムービー
    private IEnumerator Play_Before_Boss_Movie_Cor()
    {
        //初期設定
        player.GetComponent <PlayerController>().Set_Is_Playable(false);
        PauseManager.Instance.Set_Is_Pausable(false);
        is_First_Visit = SceneManagement.Instance.Is_First_Visit();

        BGMManager.Instance.Stop_BGM();

        //フェードイン
        FadeInOut.Instance.Start_Fade_In(new Color(0, 0, 0), 0.05f);
        yield return(new WaitForSeconds(1.0f));

        //セリフ1
        if (is_First_Visit)
        {
            _message.Start_Display("LarvaText", 1, 1);
            yield return(new WaitUntil(_message.End_Message));
        }

        //ラルバ登場
        MoveTwoPoints _move = larva.GetComponent <MoveTwoPoints>();

        _move.Start_Move(new Vector3(128f, 0));
        yield return(new WaitUntil(_move.End_Move));

        //セリフ2
        if (is_First_Visit)
        {
            _message.Start_Display("LarvaText", 2, 5);
            yield return(new WaitUntil(_message.End_Message));
        }

        //終了設定
        player.GetComponent <PlayerController>().Set_Is_Playable(true);
        PauseManager.Instance.Set_Is_Pausable(true);

        //戦闘開始
        larva.GetComponent <LarvaController>().Start_Battle();
        BGMManager.Instance.Change_BGM("Stage1_Boss");
    }
    private IEnumerator Rush_Cor()
    {
        GameObject    camera = GameObject.FindWithTag("MainCamera");
        GameObject    player = GameObject.FindWithTag("PlayerTag");
        MoveTwoPoints _move  = GetComponent <MoveTwoPoints>();

        //初期位置
        transform.position = new Vector3(camera.transform.position.x + 240f, 170f);

        //突進
        float height = player.transform.position.y - transform.position.y;

        _move.Change_Paramter(0.007f, height, 0);
        Vector2 aim_Pos = new Vector2(transform.position.x - 600f, 170f);

        _move.Start_Move(aim_Pos);

        yield return(new WaitUntil(_move.End_Move));

        Destroy(gameObject);
    }
Esempio n. 10
0
    //ブロックの移動
    private IEnumerator Move_Block_Cor(GameObject block, Vector2Int direction)
    {
        MoveTwoPoints move = block.GetComponent <MoveTwoPoints>();

        if (move == null)
        {
            move = block.AddComponent <MoveTwoPoints>();
            move.Change_Transition_Curve(AnimationCurve.Linear(0, 0, 1, 1), 0);
            move.Change_Paramter(0.07f, 0, 0);
        }

        Vector3 d        = new Vector3(direction.x, direction.y);
        Vector2 next_Pos = block.transform.position + d * block_Size;

        move.Start_Move(next_Pos);

        //移動が終わるまで無敵化
        block.layer = LayerMask.NameToLayer("InvincibleLayer");
        yield return(new WaitUntil(move.End_Move));

        block.layer = LayerMask.NameToLayer("Default");
    }
    //バックジャンプ
    // 自機と反対側に決まった座標に飛ぶ
    public IEnumerator Back_Jump_Cor()
    {
        is_End_Move = false;

        int direction = -Player_Direction();

        transform.localScale = new Vector3(direction, 1, 1);

        _controller.Change_Fly_Parameter();
        _controller.Change_Animation("BackJumpBool");
        yield return(new WaitForSeconds(0.2f));

        _sound.Play_Jump_Sound(0.04f);
        _move_Two_Points.Start_Move(new Vector3(160f * direction, transform.position.y), 0);
        yield return(new WaitUntil(_move_Two_Points.End_Move));

        _sound.Play_Land_Sound();
        _controller.Change_Land_Paramter();
        _controller.Change_Animation("IdleBool");

        is_End_Move = true;
    }