Exemplo n.º 1
0
        private NoteManager()
        {
            NoteLoader = ServiceLoaderFactory <INoteLoader> .CreateService();

            NoteReader = ServiceLoaderFactory <INoteReader> .CreateService();

            MyNotes = new ObservableCollection <MyNote>(NoteLoader.Load());
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
        public override void Load()
        {
            FillMagnesisList();

            StasisableProjectiles.Load();
            TimeManagement.Load();

            NoteLoader.Load();

            if (!Main.dedServ)
            {
                TLoZInput.Load(Instance);
                TLoZTextures.Load();
                UIManager.Load();
                TLoZDialogues.Load();
            }
        }
Exemplo n.º 4
0
    // 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);
    }
Exemplo n.º 5
0
 public void Save()
 {
     NoteLoader.Save(MyNotes);
 }