// Update is called once per frame void Update() { if (!onceflag) { //曲が終了した後の処理 if (musicStatus.isEnd) { onceflag = true; //MusicNameをとる sceneMove = GameObject.Find("SceneManager").GetComponent <SceneMove>(); loadMusic = GameObject.Find("MusicManager").GetComponent <LoadMusicFile>(); //data.Musicnameに名前を持ってくる data.MusicName = loadMusic.BGM_MusicName[sceneMove.musicNumber].ToString(); //NoteGenerateTimingをもってくる notesGenerate = GameObject.Find("NotesManager").GetComponent <NotesGenerate>(); for (int i = 0; i < notesGenerate.GenerateTimer.Count; i++) { data.LineType.Add(notesGenerate.LineType[i]); data.NoteGenerateTiming.Add(notesGenerate.GenerateTimer[i]); } saveMusicData.SaveData(data); File.Delete("C:/Users/MuiraRyuta/Documents/UnityPackage/MusicGameForTap/Assets/MusicGameForTap/MusicData/" + data.MusicName + ".json.meta"); AssetDatabase.ImportAsset("Assets/MusicGameForTap/MusicData/" + data.MusicName, ImportAssetOptions.Default); sceneMove.MoveSelect(); } } }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { SceneMove.LoadScene(SCENE_TYPE.main); } }
private void Awake() { instance = this; if (IsFadeIn) { StartCoroutine(FadeIn()); } }
// Use this for initialization void Start() { buttonStatus = GameObject.Find("PlayMusicButton").GetComponent <ButtonStatus>(); musicStatus = GetComponent <MusicStatus>(); targetMusic = GetComponent <AudioSource>(); loadMusicFile = GetComponent <LoadMusicFile>(); musicSelect = GameObject.Find("SceneManager").GetComponent <SceneMove>(); targetMusic.clip = (AudioClip)loadMusicFile.BGM_MusicName[musicSelect.musicNumber]; }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(this.gameObject); } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
public void LoadScene(IScene scene, SceneMove move) { m_initialized = false; m_scene = scene; gameObject.SetActive(true); m_move = move; if (move != SceneMove.None) { var rt = canvas.GetComponent<RectTransform>(); Vector3 pos = new Vector3(move == SceneMove.Left ? 6.4f : -6.4f, 0); m_startPos = Root.localPosition; Root.localPosition = pos; transform.localPosition = (pos * -100f); } }
private void Awake() { sceneMove = this; }
private void Awake() { instance = this; }