Beispiel #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Bullet")
     {
         CSoundPlayer.PlaySound("Touhou_death", true);
         Destroy(gameObject);
         Destroy(collision.gameObject);
     }
 }
Beispiel #2
0
    public static CSoundPlayer GetInstance()
    {
        if (m_soundPlayer == null)
        {
            m_soundPlayer = new CSoundPlayer();
        }

        return(m_soundPlayer);
    }
Beispiel #3
0
        //-------------------------------------------------------------------------------------
        private void StopSonnerie()
        {
            m_btnStopSonnerie.ImageIndex = 1;
            m_btnStopSonnerie.Enabled    = false;

            if (m_nIdSonnerieEnCours != null)
            {
                CSoundPlayer.StopSound(m_nIdSonnerieEnCours.Value);
            }
            m_nIdSonnerieEnCours = null;
        }
Beispiel #4
0
 //----------------------------------------------------------------------
 // コンストラクタ
 //----------------------------------------------------------------------
 // @Param   none
 // @Return  none
 // @Date    2014/10/29  @Update 2014/10/29  @Author T.Kawashita
 //          2014/11/15  @Update 2014/11/15  @Author T.Takeuchi
 //          2014/12/7   @Update 2014/12/7   @Author T.Kawashita
 //----------------------------------------------------------------------
 void Start()
 {
     Init();
     m_time = 0.0f;
     // music
     m_soundPlayer = new CSoundPlayer();
     m_soundPlayer.PlayBGMFadeIn("result/bgm_01", 0.2f);
     CResultManager.m_soundPlayer.StopSE();
     m_soundPlayer.ChangeSEVolume(0.2f);
     //m_soundPlayer.LoopSE("result/supoter_countup");
 }
Beispiel #5
0
    void Start()
    {
        for (int i = 0; i < BulletFactory.Length; ++i)
        {
            BulletFactory[i].Load();
        }

        // Soundフォルダからすべての音声ファイルを読み込む
        if (!CSoundPlayer.LoadAllSounds("se"))
        {
            print("seファイル読み込みに失敗しました");
        }
    }
    public static CSoundPlayer m_soundPlayer; // サウンドプレイヤー

    //----------------------------------------------------------------------
    // コンストラクタ
    //----------------------------------------------------------------------
    // @Param	none
    // @Return	none
    // @Date	2014/10/27  @Update 2014/10/27  @Author T.Kawashita
    //          2014/11/13  @Update 2014/11/13  @Author T.Takeuchi       シーン移動しても消滅しない処理追加
    //----------------------------------------------------------------------
    void Awake()
    {
        m_nowStatus  = eSTATUS.eWAIT;
        m_frame      = 0;
        m_isGamePlay = true;

        CGameData.GetInstance().Init();
        this.LoadData();

        m_redPoint  = 0;
        m_bluePoint = 0;

        m_soundPlayer = new CSoundPlayer();
        m_soundPlayer.PlayBGMFadeIn("game/bgm_01", 0.05f);
    }
Beispiel #7
0
    // Update is called once per frame
    void Update()
    {
        CalcInput();
        VX = VY = 0 < InputArray["Fire3"] ? 2.5f * Time.deltaTime : 7.0f * Time.deltaTime;

        float x = Input.GetAxisRaw("Horizontal");
        float y = Input.GetAxisRaw("Vertical");

        if (x < 0)
        {
            VX = -VX;
        }
        else if (x == 0)
        {
            VX = 0;
        }
        if (y < 0)
        {
            VY = -VY;
        }
        else if (y == 0)
        {
            VY = 0;
        }
        // 斜め方向の速度調節
        if (VX != 0 && VY != 0)
        {
            VX = VX * Sqrt2;
            VY = VY * Sqrt2;
        }
        transform.position = CUtility.ClampPosition(new Vector3(transform.position.x + VX, transform.position.y + VY, 0));

        // Zキー押しっぱなしで6フレームに1度ショットを発射する
        if (0 < InputArray["Fire1"] && InputArray["Fire1"] % 6 == 0)
        {
            CSoundPlayer.PlaySound("cshot", true);
            if (0 < InputArray["Fire3"])//低速移動中なら
            {
                LowerSpeedShot();
            }
            else // 通常移動中なら
            {
                HiSpeedShot();
            }
        }
        _Animator.SetFloat("H", x);
    }
    // Use this for initialization
    void Start()
    {
        m_Count = 0;
        // 必要データの読込み
        GameObject m_TeamData = GameObject.Find("TeamData");

        GameObject m_TeamSelect_1 = transform.FindChild("Team1_2").gameObject;
        GameObject m_TeamSelect_2 = transform.FindChild("Team3_4").gameObject;

        m_Fade_flag_1 = m_TeamSelect_1.GetComponent <Player_1_Script>();
        m_Fade_flag_2 = m_TeamSelect_2.GetComponent <Player_3_Script>();

        m_isFade = false;

        // 音楽再生用ゲームオブジェクト作成
        m_soundPlayer = new CSoundPlayer();
        m_soundPlayer.PlayBGMFadeIn("select/bgm_01", 0.1f);
    }
Beispiel #9
0
        //-------------------------------------------------------------------------------------
        private void StartSonnerie()
        {
            m_btnStopSonnerie.ImageIndex = 0;
            m_btnStopSonnerie.Enabled    = true;

            string strFichier = "";

            if (m_proxySonnerie != null)
            {
                strFichier = m_proxySonnerie.NomFichierLocal;
            }

            int?nIdSonnerie = CSoundPlayer.StartSound(strFichier);

            if (nIdSonnerie != null)
            {
                m_nIdSonnerieEnCours = nIdSonnerie;
            }
        }
Beispiel #10
0
    //----------------------------------------------------------------------
    // コンストラクタ
    //----------------------------------------------------------------------
    // @Param	none
    // @Return	none
    // @Date	2014/12/10  @Update 2014/12/10  @Author T.Kawashita
    //----------------------------------------------------------------------
    void Start()
    {
        m_status = eSTATUS_VICTORYPERFORMANCE.eFADE_IN;

        if (TeamData.GetWinTeamNo() == 0 || TeamData.GetWinTeamNo() == 1)
        {
            GameObject.Instantiate(Resources.Load("Prefab/Result/player_victory"));
        }
        else if (TeamData.GetWinTeamNo() == 2)
        {
            GameObject.Instantiate(Resources.Load("prefab/Result/player_draw_1"));
        }

        m_soundPlayer = new CSoundPlayer();
        m_soundPlayer.ChangeSEVolume(0.2f);
        m_soundPlayer.PlaySE("result/supoter_finish");

        // パネル取得
        m_mainUIPanel = GameObject.Find("MainUI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").gameObject;
        m_1p2pUIPanel = GameObject.Find("1p2pUI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").gameObject;
        m_3p4pUIPanel = GameObject.Find("3p4pUI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").gameObject;

        m_mainUIPanel.transform.FindChild("BlackOut").gameObject.AddComponent <CFadeIn> ();
        m_1p2pUIPanel.transform.FindChild("BlackOut").gameObject.AddComponent <CFadeIn> ();
        m_3p4pUIPanel.transform.FindChild("BlackOut").gameObject.AddComponent <CFadeIn> ();

        if (TeamData.GetWinTeamNo() == 0 || TeamData.GetWinTeamNo() == 1)
        {
            m_motionPlayer = GameObject.Find("player_victory(Clone)").gameObject;
        }
        else if (TeamData.GetWinTeamNo() == 2)
        {
            m_motionPlayer = GameObject.Find("player_draw_1(Clone)").gameObject;
        }
        m_mainCamera = GameObject.Find("MainCamera").gameObject;
        m_1p2pCamera = GameObject.Find("1p2pCamera").gameObject;
        m_3p4pCamera = GameObject.Find("3p4pCamera").gameObject;

        m_flame = 0.0f;

//		m_motionPlayer.animation.Stop ();
    }
Beispiel #11
0
 //GameObject newParent = new GameObject();
 // Update is called once per frame
 void Update()
 {
     if (Cnt < 100)
     {
         transform.position += new Vector3(0.0f, -3.0f, 0.0f) * Time.deltaTime;
     }
     if (Cnt == 300)
     {
         CSoundPlayer.PlaySound("enemy_shot", true);
         GameObject.Find("GameManager").GetComponent <CGameManager>().BulletFactory[3].CreateBullet(transform.position, 0);
     }
     if (Cnt > 340)
     {
         transform.position += new Vector3(0.0f, 3.0f, 0.0f) * Time.deltaTime;
     }
     Cnt++;
     if (CUtility.IsOut(transform.position))
     {
         Destroy(gameObject);
     }
 }
    // Use this for initialization
    void Start()
    {
        m_StartCount = 0;
        GameObject entry1 = this.transform.FindChild("entry_wait_state_1").gameObject;
        GameObject entry2 = this.transform.FindChild("entry_wait_state_2").gameObject;
        GameObject entry3 = this.transform.FindChild("entry_wait_state_3").gameObject;
        GameObject entry4 = this.transform.FindChild("entry_wait_state_4").gameObject;
        GameObject Fade   = this.transform.FindChild("Title_Fade").gameObject;

        m_entry1 = entry1.GetComponent <Entry_1>();
        m_entry2 = entry2.GetComponent <Entry_2>();
        m_entry3 = entry3.GetComponent <Entry_3>();
        m_entry4 = entry4.GetComponent <Entry_4>();
        m_Fade   = Fade.GetComponent <Title_Fade>();

        // 音楽用ゲームオブジェクト作成
        m_soundPlayer = new CSoundPlayer();
        m_SE          = this.gameObject.GetComponent <SEPlay>();
        m_soundPlayer.PlayBGMFadeIn("title/bgm_01", 0.1f);
        m_SE.VolumeSE(0.1f);

        // スコアロード
        TeamData.Load();
    }
Beispiel #13
0
    //----------------------------------------------------------------------
    // チュートリアル画面の初期化
    //----------------------------------------------------------------------
    // @Param   none
    // @Return  none
    // @Date    2014/12/13  @Update 2014/12/13  @Author T.Takeuichi
    //----------------------------------------------------------------------
    void InitTutorial()
    {
        CGameManager.m_nowStatus = CGameManager.eSTATUS.eGAME;
        CGameData.m_isTimer      = false;

        // 配信用カメラ削除
        GameObject.Find("DeliveryCamera").SetActive(false);
        // チュートリアルに必要のない機能を無効化
        GameObject.Find("goal1_collision").SetActive(false);
        GameObject.Find("goal2_collision").SetActive(false);
        GameObject.Find("goal1_collision2").SetActive(false);
        GameObject.Find("goal2_collision2").SetActive(false);
        // NPCの削除
        GameObject.Find("CPU1").SetActive(false);
        GameObject.Find("CPU2").SetActive(false);
        GameObject.Find("GoalKeeper1").SetActive(false);
        GameObject.Find("GoalKeeper2").SetActive(false);
        // メインUI削除
        GameObject.Find("MainUI").SetActive(false);
        // フェードアウト用
        this.bloackOut[0] = GameObject.Find("MainPanelFeed").gameObject;
        this.bloackOut[1] = GameObject.Find("SubPanelFeed0").gameObject;
        this.bloackOut[2] = GameObject.Find("SubPanelFeed1").gameObject;
        // 制限時間OFF
        GameObject.Find("P1&P2").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_colon").gameObject.SetActive(false);
        GameObject.Find("P1&P2").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_sec").gameObject.SetActive(false);
        GameObject.Find("P1&P2").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_tensec").gameObject.SetActive(false);
        GameObject.Find("P1&P2").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_min").gameObject.SetActive(false);

        GameObject.Find("P3&P4").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_colon").gameObject.SetActive(false);
        GameObject.Find("P3&P4").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_sec").gameObject.SetActive(false);
        GameObject.Find("P3&P4").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_tensec").gameObject.SetActive(false);
        GameObject.Find("P3&P4").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("time_min").gameObject.SetActive(false);

        GameObject.Find("P1&P2").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("BlackOut").gameObject.SetActive(false);
        GameObject.Find("P3&P4").transform.FindChild("UI").transform.FindChild("Camera").transform.FindChild("Anchor").transform.FindChild("Panel").transform.FindChild("BlackOut").gameObject.SetActive(false);

        GameObject.Find("BGMObject").gameObject.SetActive(false);
        GameObject.Find("SEObject").gameObject.SetActive(false);

        m_soundPlayer = new CSoundPlayer();
        m_soundPlayer.PlayBGMFadeIn("tutorial/bgm_01", 0.05f);

        // PlayerMode
        for (int i = 1; i < 5; i++)
        {
            this.player[i - 1] = GameObject.Find("Player" + i).transform.FindChild("player").gameObject;
        }

        // オブジェクト挿入
        for (int i = 0; i < 3; i++)
        {
            this.guidVewer[i] = GameObject.Find("GuidVewer" + i);
        }

        for (int i = 0; i < 4; i++)
        {
            this.buttonVewer[i] = GameObject.Find("Next_" + i);
        }

        // 最初の画面に合わせて設定
        this.guidVewer[0].SetActive(true);
        this.guidVewer[0].GetComponent <UISprite>().spriteName = "user'sGuide_1";
        this.guidVewer[1].SetActive(false);
        this.guidVewer[2].SetActive(false);

        ReSetButtonCheck();
    }