public static float Extended(float start, float end, float percent, Func <float, float> easing) { if (easing == null) { DebugWrapper.Log("easing function cannot ve null"); return(start); } return(Classic(start, end, easing(percent))); }
public void ParseBMS(string filePath) { this.Awake(); // 이전 씬(보통 음악선택 씬)에서 미리 받아둔 음악정보 데이터가 있다면, 음악 정보에 관련된 파싱은 생략하고 해당 데이터를 사용. if (isLoadInfo) { bmsHeader.info = SingletonData.Instance.selectedMusicInfo; DebugWrapper.Log("이전 Scene에서 받아온 음악 정보를 사용합니다."); } string[] textLine = File.ReadAllLines(bmsHeader.BmsFilePath, System.Text.Encoding.Default); if (textLine.Length > 0) { char[] separator = { ' ', ':' }; string[] splitText; if (!isLoadInfo) { DebugWrapper.Log("이전 Scene에서 받아온 음악 정보가 없기 때문에 별도의 Parsing을 진행합니다."); } for (int lineIndex = 0; lineIndex < textLine.Length; ++lineIndex) { textLine[lineIndex] = textLine[lineIndex].Trim(); if (string.IsNullOrEmpty(textLine[lineIndex]) || !textLine[lineIndex].StartsWith("#")) { continue; } splitText = textLine[lineIndex].Split(separator); if (splitText.Length <= 1) { continue; } if (!isLoadInfo) { Parsing_ShowHeader(ref splitText); } Parsing_GameHeader(ref splitText); Parsing_GameData(ref splitText); } } }
private void Update() { if (Input.GetKeyDown(KeyCode.T)) { isAutoMode = !isAutoMode; if (isAutoMode) { DebugWrapper.Log("Auto Mode On"); } else { DebugWrapper.Log("Auto Mode Off"); } } if (Input.GetKeyDown(KeyCode.P)) { isPause = !isPause; if (isPause) { Time.timeScale = 0f; DebugWrapper.Log("Game Pause"); } else { Time.timeScale = 1f; DebugWrapper.Log("Game Resume"); } } if (Input.GetKeyDown(KeyCode.Escape)) { DebugWrapper.LogWarning("ESC 키를 통해 실행을 정지했습니다."); EditorApplication.isPlaying = false; } if (Input.GetKeyDown(KeyCode.N)) { SceneManager.LoadSceneAsync((int)eSceneName.SCENE_RESULT); } }
void Update() { DebugWrapper.Log("Testing"); }
void DrawEntryBoard(Dictionary <string, AudioEntry> dictionary) { if (dictionary == null) { return; } if (displayId != "" && currentAudioEntry == null) { if (dictionary.TryGetValue(displayId, out currentAudioEntry)) { } } if (currentAudioEntry == null) { currentAudioEntry = new AudioEntry( ); } EditorGUILayout.BeginVertical("box", GUILayout.Width(200)); string key = displayId, path = currentAudioEntry.path; int loadLevel = currentAudioEntry.loadLevel; AudioType type = currentAudioEntry.type; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("ID:"), GUILayout.Width(50)); key = EditorGUILayout.TextField(key); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Path:"), GUILayout.Width(50)); Color oldColor = GUI.color; GUI.color = Color.yellow; EditorGUILayout.LabelField(path); GUI.color = oldColor; EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Get Asset Path")) { Object selectedObj = Selection.activeObject; if (selectedObj != null) { AudioClip audioClip = (AudioClip)selectedObj; if (audioClip != null) { path = AssetDatabase.GetAssetPath(audioClip.GetInstanceID()); DebugWrapper.Log(path); string[] pathSplitted = path.Split('/'); bool startAdding = false; string fileName = ""; for (int splitedIndex = 0; splitedIndex < pathSplitted.Length; splitedIndex++) { if (startAdding) { fileName += pathSplitted [splitedIndex] + "/"; } if (pathSplitted [splitedIndex] == "Resources") { startAdding = true; } } string[] fileNameSplited = fileName.Split('.'); path = fileNameSplited[0]; DebugWrapper.Log(path); } } } float inherentVolume = currentAudioEntry.inherentVolume; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Volume:"), GUILayout.Width(50)); inherentVolume = EditorGUILayout.Slider(inherentVolume, 0.0f, 1.0f); EditorGUILayout.EndHorizontal(); currentAudioEntry.inherentVolume = inherentVolume; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Load Level:"), GUILayout.Width(60)); loadLevel = EditorGUILayout.IntField(loadLevel, GUILayout.Width(15)); AudioClipLoadType aclt = currentAudioEntry.loadType; EditorGUILayout.Space(); EditorGUILayout.LabelField(new GUIContent("Type:"), GUILayout.Width(30)); aclt = (AudioClipLoadType)EditorGUILayout.EnumPopup(aclt, GUILayout.Width(140)); currentAudioEntry.loadType = aclt; EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Type:")); type = (AudioType)EditorGUILayout.EnumPopup(type, GUILayout.Width(50)); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); displayId = key; currentAudioEntry.path = path; currentAudioEntry.loadLevel = loadLevel; currentAudioEntry.type = type; }