Exemplo n.º 1
0
    private IEnumerator stageClear()
    {
        staticValueManagerS sVMS = staticValueManagerGetter.getManager();

        GMS.talkingPartLoader("0-3-0-4");

        //引き続きコライダーは停止
        GMS.setAllCollider2DEnabale(false);

        yield return(new WaitForSeconds(0.2f));

        Time.timeScale = 1;             //パーティクルを使うため1にする

        GameObject tmpGO = (GameObject)Instantiate(_stageClearCaption);

        while (tmpGO != null)
        {
            yield return(null);
        }

        sceneChangeValue sceneCV = sVMS.getNowSceneChangeValue();

        GMS.saveBattleResultValues();

        //0-3-0-5
        sVMS.setStoryProgress("0-3-0-5");
        sVMS.changeScene(sceneChangeStatusEnum.gotoTalkScene);
    }
Exemplo n.º 2
0
    /*
     *
     * void Update(){
     *      if (Input.GetKeyDown (KeyCode.Z)) {
     *              //debuf
     *              //this.OnTriggerStay2D(null);
     *      }
     * }
     *
     * void OnTriggerStay2D(Collider2D argsCo){
     *      //Debug.Log ("Enter Collider");
     *
     *      //このコライダー停止
     *      Destroy (this.gameObject.GetComponent<BoxCollider2D> ());  //.enabled = false;
     *
     *      //GMS.talkingPartLoader ("0-3-0-3");
     *
     * }
     *
     */



    private IEnumerator stageClear()
    {
        staticValueManagerS sVMS = staticValueManagerGetter.getManager();

        //引き続きコライダーは停止
        GMS.setAllCollider2DEnabale(false);

        Time.timeScale = 1;             //パーティクルを使うため1にする

        GameObject tmpGO = (GameObject)Instantiate(_stageClearCaption);

        while (tmpGO != null)
        {
            yield return(null);
        }

        sceneChangeValue sceneCV = sVMS.getNowSceneChangeValue();

        //
        sVMS.addStoryProgresses(enum_StoryProgressType.Step);

        //新規キャラの追加
        GMS.saveBattleResultValues_EnterCharacterFlag(enumCharaNum.suzusiro_03, true, enumCharactorJoinType.sameEnju);

        GMS.saveBattleResultValues();
        //Debug.Log ("gotoStageSelect");
        //sVMS.changeScene (sceneChangeStatusEnum.gotoStageSelect);

        sVMS.setStoryProgress("0-6-0-2");
        sVMS.changeScene(sceneChangeStatusEnum.gotoTalkScene);
    }
    public charaStartBattleInfo(sceneChangeValue argsVal)
    {
        retPosition = new Vector3[(int)enumCharaNum.maxCnt];

        //各シーンの初期位置

        switch (argsVal.sceneFileName)
        {
        case "0-1-0-0":
            //エンジュしかいない為、他省略
            retPosition[0] = new Vector3(0f, 0f, 0f);
            break;

        case "0-2-0-0":
            //エンジュしかいない為、他省略
            retPosition[0] = new Vector3(-2f, -0.5f, 0f);
            break;

        case "0-3-0-0":
            retPosition[0] = new Vector3(11f, -0.1f, 0f);
            retPosition[1] = new Vector3(11f, -0.5f, 0f);
            break;

        case "0-3-1-0":
            retPosition[0] = new Vector3(1.8f, -1.3f, 0f);
            retPosition[1] = new Vector3(1.6f, -1.3f, 0f);
            break;

        case "0-4-0-0":
            retPosition[0] = new Vector3(3f, -1.3f, 0f);
            retPosition[1] = new Vector3(3f, -1.7f, 0f);
            break;

        default:
            for (int tmpI = 0; tmpI < retPosition.Length; tmpI++)
            {
                //retPosition[tmpI] = new Vector3(0f, (tmpI * 0.4f), 0f);
                //Debug.Log (tmpI);
            }

            //ステージスクリプトに移行中
            break;
        }
    }
    // Use this for initialization
    void Start()
    {
        //子オブジェクトの破壊
        foreach (Transform n in this.transform)
        {
            GameObject.Destroy(n.gameObject);
        }

        staticValueManagerS s = staticValueManagerGetter.getManager();

        if (s.getRenderingStageEffFlag() == false)
        {
            return;
        }

        sceneChangeValue scv = s.getNowSceneChangeValue();

        string[] tmpStr = scv.sceneFileName.Split(new string[] { "-" }, System.StringSplitOptions.None);

        this.setParticle(tmpStr[0], tmpStr[1], tmpStr[2]);
    }
Exemplo n.º 5
0
    private IEnumerator stageClear()
    {
        staticValueManagerS sVMS = staticValueManagerGetter.getManager();

        /*
         * //会話表示
         * sVMS.getNowSceneChangeValue().sceneFileName = "0-1-0-3";
         * GameObject tmpGO = (GameObject)Instantiate (_talkPartPerefab);
         *
         * // トークシーンが破壊されるまでループして待つ
         * while (tmpGO != null) {
         *      yield return null;
         * }
         *
         * //引き続きコライダーは停止
         * GMS.setAllCollider2DEnabale (false);
         *
         */

        GameObject tmpGO;

        Time.timeScale = 1;             //パーティクルを使うため1にする

        tmpGO = (GameObject)Instantiate(_stageClearCaption);
        while (tmpGO != null)
        {
            yield return(null);
        }

        sceneChangeValue sceneCV = sVMS.getNowSceneChangeValue();

        //例外差分修正
        sVMS.addStoryProgresses(enum_StoryProgressType.Step);

        //Debug.Log ("gotoStageSelect");
        sVMS.changeScene(sceneChangeStatusEnum.gotoTalkScene);
    }
Exemplo n.º 6
0
    //
    void Awake()
    {
        Debug.Log("Awake");
        Debug.Log(SceneManager.GetActiveScene().name);


        Object.DontDestroyOnLoad(this);

        saveDataJSON01 = new Dictionary <string, object>();
        saveDataJSON02 = new Dictionary <string, object>();
        saveDataJSON03 = new Dictionary <string, object>();

        if (_debugDataReset)
        {
            PlayerPrefs.DeleteAll();
        }

        this.initSaveData(0);
        this.initSaveData(1);
        this.initSaveData(2);

        //初期値
        //各シーンからこの値を参照し、適正な値が入っている場合は正規の手順を踏む
        //もしそれ以外だった場合、デバッグモードで起動する
        //参照は getNowSceneを使用する
        nowSceneValue = new sceneChangeValue();

        //Titleだった場合はデータ選択時にこの処理をしているので不要
        if (Application.loadedLevelName != "title")
        {
            //for debug
            selectedUserSaveDat    = saveDataJSON01;
            selectedSaveDataNumber = 0;
            nowSceneValue.convertSelectedUserSaveData();
        }
    }
Exemplo n.º 7
0
    //**//


    public void changeScene(sceneChangeStatusEnum argsS)
    {
        //他の場所から呼ばれる

        sceneChangeValue tmpSCV = new sceneChangeValue();

        tmpSCV.convertSelectedUserSaveData();

        //時間は戻す
        Time.timeScale = 1f;

        switch (argsS)
        {
        case sceneChangeStatusEnum.dataLoading:
            // argsVal は必要ない
            //セーブデータから確認する

            //chapter進捗を確認しどこに移動するか決める

            object tmpPgrs = selectedUserSaveDat[storyProgress_Key];

            switch (int.Parse(tmpPgrs.ToString()))
            {
            case 0:
                //now Game
                //Application.LoadLevel("talkScene");
                SceneManager.LoadScene("talkScene");

                break;

            default:
                //基本ここ
                //ステージセレクトへ移動
                //Application.LoadLevel("stageSelect");
                SceneManager.LoadScene("stageSelect");
                break;
            }

            break;

        case sceneChangeStatusEnum.gotoTitle:
            // argsVal は必要ない
            //Application.LoadLevel("title");
            SceneManager.LoadScene("title");
            break;

        case sceneChangeStatusEnum.gotoTalkScene:
            //下記の関数がスタートする
            //talkScene - talkingMain - mainText - talkingMainScript - Start()
            //Application.LoadLevel("talkScene");
            SceneManager.LoadScene("talkScene");

            break;

        case sceneChangeStatusEnum.gotoStageSelect:
            //Debug.Log ("stageSelect");
            //Application.LoadLevel("stageSelect");
            SceneManager.LoadScene("stageSelect");

            break;

        case sceneChangeStatusEnum.gotoSortieSelect:
            //Debug.Log ("gotoSortieSelect");
            //Application.LoadLevel("selectSortieCharactersScene");
            SceneManager.LoadScene("selectSortieCharactersScene");

            break;

        case sceneChangeStatusEnum.gotoBattle:
            //Debug.Log ("goto Battle : " + tmpSCV.sceneFileName);
            //Application.LoadLevel(tmpSCV.sceneFileName);
            SceneManager.LoadScene(tmpSCV.sceneFileName);
            break;
        }
    }