Esempio n. 1
0
        /// <summary>
        /// 指定されたノーツを画面上に生成する
        /// </summary>
        public void GenerateObject(MusicNote note, int colorIndex = -1)
        {
            // 初期化処理
            MusicNoteGameObject noteObject = GetNoteObject();

            note.SetGameObject(noteObject);

            // 画像設定
            if (note.Place.IsLeftSide() || note.Place.IsRightSide())
            {
                noteObject.NoteImage.sprite = noteSprites[1];
            }
            else
            {
                noteObject.NoteImage.sprite = noteSprites[0];
            }

            // 色設定
            if (colorIndex == -1)
            {
                noteObject.NoteColor = Color.white;
            }
            else
            {
                noteObject.NoteColor = MusicConst.NotesColor[colorIndex];
            }
        }