예제 #1
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();
        }
    }
예제 #2
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");
    }
 private void Awake()
 {
     //取得
     _controller      = GetComponent <NemunoController>();
     _attack_Func     = GetComponent <NemunoAttackFunction>();
     _shoot           = GetComponentInChildren <NemunoShoot>();
     _barrier         = GetComponentInChildren <NemunoBarrier>();
     _move_Two_Points = GetComponent <MoveTwoPoints>();
 }
    private void Awake()
    {
        //取得
        _controller = GetComponent <LarvaController>();
        shoot_Obj   = GetComponentInChildren <LarvaShootObj>();
        _move       = GetComponent <MoveTwoPoints>();

        player = GameObject.FindWithTag("PlayerTag");
    }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     //取得
     _boss_Controller = GetComponent <BossEnemy>();
     _move_Two_Points = GetComponent <MoveTwoPoints>();
     //ボス戦開始前無敵化
     _boss_Controller.Set_Is_Invincible(true);
     //オブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(flower_Bullet, 4);
 }
예제 #6
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 void Awake()
    {
        //取得
        _controller      = GetComponent <NemunoController>();
        _attack          = GetComponent <NemunoAttack>();
        _sound           = GetComponentInChildren <NemunoSoundEffect>();
        _collision       = GetComponent <NemunoCollision>();
        _shoot           = GetComponentInChildren <NemunoShoot>();
        _barrier         = GetComponentInChildren <NemunoBarrier>();
        _sprite          = GetComponent <SpriteRenderer>();
        _move_Two_Points = GetComponent <MoveTwoPoints>();

        player       = GameObject.FindWithTag("PlayerTag");
        camera_Shake = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>();
    }
예제 #8
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 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);
    }
예제 #11
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");
    }