예제 #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;
            //飛び去る
            MoveConstTime _move = GetComponent <MoveConstTime>();
            _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));

            Change_Status_With_Rumia();
            //戻す
            GetComponentInChildren <ParticleSystem>().Play();
            GetComponent <BoxCollider2D>().enabled = true;
            mark_Up_Baloon.SetActive(true);
        }
    }
예제 #2
0
    private IEnumerator Controlle_Big_Bullet_Cor(Vector2 deposit_Pos)
    {
        GameObject main_Camera = GameObject.FindWithTag("MainCamera");

        GameObject bullet = Instantiate(big_Bullet.gameObject);

        bullet.SetActive(true);
        bullet.transform.position = transform.position;
        bullet.transform.SetParent(main_Camera.transform);

        MoveConstTime bullet_Move = bullet.GetComponent <MoveConstTime>();

        ShootSystem[]      bullet_Shoots = bullet.GetComponentsInChildren <ShootSystem>();
        VerticalVibeMotion vibe_Motion   = bullet.GetComponent <VerticalVibeMotion>();

        bullet_Move.Start_Move(new Vector3(deposit_Pos.x, deposit_Pos.y, 10));
        yield return(new WaitUntil(bullet_Move.End_Move));

        vibe_Motion.enabled = true;

        foreach (var shoot in bullet_Shoots)
        {
            shoot.Shoot();
        }

        yield return(new WaitForSeconds(BIG_BULLET_LIFETIME));

        vibe_Motion.enabled = false;
        bullet_Move.Start_Move(new Vector3(bullet.transform.localPosition.x, 280f, 10));
        yield return(new WaitUntil(bullet_Move.End_Move));

        Destroy(bullet);
    }
    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();

        //自機登場

        MoveConstTime player_Move = player.AddComponent <MoveConstTime>();

        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 <Nemuno>().Start_Battle();
        BGMManager.Instance.Change_BGM("Stage2_Boss");
    }
 private void Awake()
 {
     //取得
     _controller      = GetComponent <Nemuno>();
     _attack_Func     = GetComponent <NemunoAttackFunction>();
     _shoot           = GetComponentInChildren <NemunoShoot>();
     _barrier         = GetComponentInChildren <NemunoBarrier>();
     _move_Two_Points = GetComponent <MoveConstTime>();
 }
    private void Awake()
    {
        //取得
        _controller = GetComponent <Larva>();
        shoot_Obj   = GetComponentInChildren <LarvaShootObj>();
        _move       = GetComponent <MoveConstTime>();

        player = GameObject.FindWithTag("PlayerTag");
    }
 // Use this for initialization
 void Start()
 {
     //取得
     _move_Two_Points = GetComponent <MoveConstTime>();
     //ボス戦開始前無敵化
     Set_Is_Invincible(true);
     //オブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(flower_Bullet, 4);
 }
예제 #7
0
 void Start()
 {
     //取得
     player             = GameObject.FindWithTag("PlayerTag");
     main_Camera        = GameObject.FindWithTag("MainCamera");
     _rigid             = GetComponent <Rigidbody2D>();
     _gravitate         = GetComponent <GravitatePlayer>();
     _move              = GetComponent <MoveConstTime>();
     _shoot             = GetComponentInChildren <ShootSystem>();
     _gravitate.enabled = false;
 }
예제 #8
0
 void Start()
 {
     block_Barrier     = GetComponentInChildren <NarumiBlockBarrier>();
     rect_Block_Gen    = GetComponentInChildren <ObjectRectFormationGenerator>();
     _effect           = GetComponentInChildren <NarumiEffects>();
     _shoot            = GetComponentInChildren <NarumiShoot>();
     _main             = GetComponent <Narumi>();
     _move_Const_Time  = GetComponent <MoveConstTime>();
     _move_Const_Speed = GetComponent <MoveConstSpeed>();
     camera_Shake      = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>();
 }
예제 #9
0
 void Awake()
 {
     //取得
     _eternal          = GetComponent <Eternal>();
     _last_Attack      = GetComponent <EternalLastAttack>();
     _shoot            = GetComponentInChildren <EternalShoot>();
     _effect           = GetComponentInChildren <EternalEffect>();
     _se               = GetComponentInChildren <SEManager>();
     _collision        = GetComponentInChildren <BossChildCollision>();
     _small_Larve_Gen  = GetComponentInChildren <SmallLarveGenerator>();
     _move             = GetComponent <MoveConstTime>();
     player            = GameObject.FindWithTag("PlayerTag");
     player_Controller = player.GetComponent <PlayerController>();
 }
예제 #10
0
    private void Awake()
    {
        //取得
        _controller      = GetComponent <Nemuno>();
        _attack          = GetComponent <NemunoAttack>();
        _sound           = GetComponentInChildren <NemunoSoundEffect>();
        _collision       = GetComponent <NemunoCollision>();
        _shoot           = GetComponentInChildren <NemunoShoot>();
        _barrier         = GetComponentInChildren <NemunoBarrier>();
        _sprite          = GetComponent <SpriteRenderer>();
        _move_Two_Points = GetComponent <MoveConstTime>();

        player       = GameObject.FindWithTag("PlayerTag");
        camera_Shake = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>();
    }
 void Start()
 {
     //取得
     _okina            = GetComponent <Okina>();
     _shoot            = GetComponentInChildren <OkinaShoot>();
     _effect           = GetComponentInChildren <OkinaEffect>();
     _se               = GetComponentInChildren <SEManager>();
     _move_Const_Time  = GetComponent <MoveConstTime>();
     player            = GameObject.FindWithTag("PlayerTag");
     player_Controller = player.GetComponent <PlayerController>();
     camera_Shake      = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>();
     //オブジェクトプール生成
     ObjectPoolManager.Instance.Create_New_Pool(fairy_Crystal_Red_Fairy, 3);
     ObjectPoolManager.Instance.Create_New_Pool(fairy_Crystal_Green_Fairy, 3);
 }
    private IEnumerator Battle_Movie_Cor()
    {
        GameObject camera = GameObject.FindWithTag("MainCamera");

        MoveConstTime    camera_Move       = camera.GetComponent <MoveConstTime>();
        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 <Aunn>();
     _sprite           = GetComponent <SpriteRenderer>();
     _rigid            = GetComponent <Rigidbody2D>();
     _shoot            = GetComponentInChildren <AunnShoot>();
     _copy             = GetComponentInChildren <AunnCopy>();
     _copy_Shoot       = _copy.GetComponentInChildren <AunnShoot>();
     _effect           = GetComponentInChildren <AunnEffect>();
     _se               = GetComponentInChildren <SEManager>();
     _move_Const_Speed = GetComponent <MoveConstSpeed>();
     _move_Motion      = GetComponent <MoveMotion>();
     _move_Const_Time  = GetComponent <MoveConstTime>();
     foot_Collider     = transform.Find("Foot").GetComponent <ChildColliderTrigger>();
     player            = GameObject.FindWithTag("PlayerTag");
 }
예제 #14
0
    private IEnumerator Hina_Movie_Cor()
    {
        GameObject       player            = GameObject.FindWithTag("PlayerTag");
        PlayerController player_Controller = player.GetComponent <PlayerController>();
        MoveConstTime    _move             = GetComponent <MoveConstTime>();
        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, 6);
        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);
    }
예제 #15
0
    void Start()
    {
        //取得
        _controller        = GetComponent <SatoMai>();
        _shoot             = GetComponent <SatoMaiShoot>();
        _effect            = GetComponentInChildren <SatoMaiEffect>();
        _se                = GetComponentInChildren <SEManager>();
        _block_Wall_Attack = GetComponent <SatoMaiBlockWall>();

        player  = GameObject.FindWithTag("PlayerTag");
        satomai = _controller.satomai;
        satono  = _controller.satono;
        mai     = _controller.mai;

        satomai_Move = satomai.GetComponent <MoveConstTime>();
        satono_Move  = satono.GetComponent <MoveConstTime>();
        mai_Move     = mai.GetComponent <MoveConstTime>();
    }
예제 #16
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();

        //フェードイン
        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));
        }

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

        _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 <Larva>().Start_Battle();
        BGMManager.Instance.Change_BGM("Stage1_Boss");
    }
예제 #17
0
    //ブロックの移動
    private IEnumerator Move_Block_Cor(GameObject block, Vector2Int direction)
    {
        MoveConstTime move = block.GetComponent <MoveConstTime>();

        if (move == null)
        {
            move = block.AddComponent <MoveConstTime>();
            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");
    }
예제 #18
0
 public void Start_Battle()
 {
     _move = GetComponent <MoveConstTime>();
     StartCoroutine("Battle_Cor");
 }