private NoteManager() { NoteLoader = ServiceLoaderFactory <INoteLoader> .CreateService(); NoteReader = ServiceLoaderFactory <INoteReader> .CreateService(); MyNotes = new ObservableCollection <MyNote>(NoteLoader.Load()); }
void Awake() { if (instance == null || instance.Equals(null)) { instance = this; player = GetComponentInChildren <SongPlayer>(); loader = GetComponentInChildren <NoteLoader>(); timing = GetComponentInChildren <TimingManager>(); timekeeper = GetComponentInChildren <TimeKeeper>(); } else { Destroy(this); } }
public override void Load() { FillMagnesisList(); StasisableProjectiles.Load(); TimeManagement.Load(); NoteLoader.Load(); if (!Main.dedServ) { TLoZInput.Load(Instance); TLoZTextures.Load(); UIManager.Load(); TLoZDialogues.Load(); } }
// Start is called before the first frame update void Start() { if (start_point == null || end_point == null || dot_x == null || audio == null) { Debug.Log("Component not set probably"); } Vector2 point = start_point.transform.position; dot_x.transform.position = new Vector2(point.x, point.y); dot_x.SetActive(false); dot_x.GetComponent <NoteController>().parentLine = this; var notes = NoteLoader.sort(new NoteLoader((end_point.transform.position - start_point.transform.position).magnitude, speed, audio.clip.frequency, 0.5f).readAll(fs.read(@"\1.txt")));//设置1.txt的绝对位置 waitForShowNotes = new Queue <Note>(notes); nowOnScreenNotesCtrl = new Queue <NoteController>(); audio.PlayDelayed(10); }
public void Save() { NoteLoader.Save(MyNotes); }