コード例 #1
0
    public void GetCutScene()
    {
        // 노래에 맞는 컷씬 연출 프리팹 가져오기
        _animator = Resources.Load <Animator>("Cutscene/" + PlayMusicInfo.ReturnSongName() + "/" + PlayMusicInfo.ReturnSongName());
        if (_animator == null)
        {
            gameObject.SetActive(false);
            return;
        }

        gameObject.SetActive(true);
        _animator = Instantiate(_animator);
        _animator.transform.SetParent(transform, false);

        // 컷씬 타이밍 저장 파일 가져오기
        List <string> _tempstringList = FileManager.ReadFile_TXT(PlayMusicInfo.ReturnSongName() + "_CS.txt", "Cutscene/" + PlayMusicInfo.ReturnSongName() + "/");

        // 타이밍 파일이 존재하는 경우에만 타임스탬프를 저장한다.
        if (_tempstringList != null)
        {
            // 갯수에 맞게 저장 후
            _timeStamp = new float[_tempstringList.Count];
            // 파싱
            for (int i = 0; i < _timeStamp.Length; i++)
            {
                _timeStamp[i] = float.Parse(_tempstringList[i]);
            }
        }
    }
コード例 #2
0
    public void ReadNoteFile()
    {
        #region ReadNoteFIle
        // 채보 파일을 읽어온다
        List <string> _tempStringList = FileManager.ReadFile_TXT(PlayMusicInfo.ReturnSongName() + ".txt", "Notes/");
        if (_tempStringList != null)                                                                                              // 채보 파일을 읽어오는 데 성공하면
        {
            string[] _getInfo = _tempStringList[0].Split('/');                                                                    // 판정선간격, 감소속도, 롱노트진행속도 (첫줄)
            _songDelay = float.Parse(_getInfo[0]) / (float.Parse(_getInfo[1]) * Time.fixedDeltaTime) / (1 / Time.fixedDeltaTime); // 노트 활성화 간격 조정

            for (int i = 1; i < _tempStringList.Count; i++)
            {
                _getInfo = _tempStringList[i].Split('/');
                if (_getInfo.Length == 4)
                {
                    _note.Add(new Note(float.Parse(_getInfo[0]), _getInfo[1], _getInfo[2], _getInfo[3])); // 시간, 관절, 노트, 효과음
                }
                else
                {
                    _note.Add(new Note(float.Parse(_getInfo[0]), _getInfo[1], _getInfo[2], _getInfo[3], _getInfo[4])); // 시간, 관절, 노트, 효과음, 모션
                }
            }
            Invoke("StartMusic", 3.0f); // 3초 뒤 음악 재생
        }
        #endregion
        #region ReadMotionFile
        _tempStringList = FileManager.ReadFile_TXT("Motion_posInfo.csv", "", true);

        for (int i = 0; i < _tempStringList.Count; i++)
        {
            string[] _t = _tempStringList[i].Split(',');
            _motion.Add(_t[0], new Motion(_t, transform.position));
        }
        #endregion
        #region InputJointObject
        for (int i = 0; i < _joints.Length; i++)
        {
            _jointPoints.Add(_jointName[i], _joints[i]);
        }
        #endregion

        InvokeRepeating("FSM_IDLE", 0, 0.1f);
    }
コード例 #3
0
    public void GetMotion()
    {
        string        _path           = "AttackMotion/" + PlayMusicInfo.ReturnSongName(); // 연출을 보여줄 타이밍이 저장된 파일을 가져온다
        List <string> _tempstringList = FileManager.ReadFile_TXT(_path + "/timestamp.txt");

        if (_tempstringList != null)
        {
            // 갯수에 맞게 저장 후
            _timeStamp = new float[_tempstringList.Count];
            // 파싱
            for (int i = 0; i < _timeStamp.Length; i++)
            {
                _timeStamp[i] = float.Parse(_tempstringList[i]);
            }
        }

        _success = Resources.Load <RuntimeAnimatorController>(_path + "/Success"); // 방어 연출을 보여줄 애니메이션을 가져온다
        _fail    = Resources.Load <RuntimeAnimatorController>(_path + "/Fail");    // 공격 연출을 보여줄 애니메이션을 가져온다

        SetTime();
    }
コード例 #4
0
    public void StartMusic()
    {
        ActiveGauge(_redM_gauge);
        // ActiveGauge(_blueM_gauge);
        InvokeRepeating("PullCurtain", 0f, 0.05f);

        List <string> _tempstringList = FileManager.ReadFile_TXT(PlayMusicInfo.ReturnSongName() + ".txt", "Monster/");

        if (_tempstringList != null)
        {
            for (int i = 0; i < _tempstringList.Count; i++)
            {
                string[] temp = _tempstringList[i].Split('/');
                _monsterState.Add(new MonsterState(temp[0], temp[1], temp[2]));
            }
            _tempstringList = null;
        }
        else
        {
            _monsterState = null;
        }
    }
コード例 #5
0
 public void ReadNoteFile()
 {
     value = FileManager.ReadTextOneLine(PlayMusicInfo.ReturnSongName() + ".txt", "Notes/").Split('/');
     MakeObjectPool();
 }