Example #1
0
    void Awake()
    {
	    GameManager.instance.staff.Add(this);
	    remainingNames=new List<string>(nameArray);
	    walker = gameObject.AddComponent<Walker>();
	    staffRenderer=GetComponentInChildren<StaffRenderer>();
	    selectionArrow=GetComponentInChildren<Bounce>().gameObject;
	    selectionArrow.SetActive(false);
        assignmentProgress = -1;
    }
Example #2
0
        public PlayScreen(MainGame.Globals globals, SongLoader previous, Song s, SongSettings songSettings)
        {
            this.globals  = globals;
            this.previous = previous;


            ts = new SimpleTimeSource(s.PPQ, s.InitialTempo);
            //var stf = new StaffRenderer(theme, , s);
            sR = new StaffRenderer(globals.Theme, new MV
            {
                ts       = ts,
                interval = s.PPQ * 4,
            }, s);


            g   = new Core.Game(s, songSettings.MidiOut, ts, this);
            inp = new Mono.KeyboardMIDIInput(g);

            ctr = new ComboCounter(globals.Theme.TestFont, ts);

            g.Play();
        }
Example #3
0
        protected override void LoadContent()
        {
            sb    = new SpriteBatch(GraphicsDevice);
            theme = new Theme();
            theme.LoadBasic(Content);

            var loadMidi  = Task.Run(() => new MidiFile("Assets/desire_drive.mid"));
            var loadTheme = Task.Run(() => theme.LoadFromContent(Content));
            var output    = midiManager.CreateOutput();

            Task.Run(async() =>
            {
                // TODO: use this.Content to load your game content here
                var s = MidiToSong.FromMidi(await loadMidi);


                ts = new SimpleTimeSource(s.PPQ, s.InitialTempo);
                //var stf = new StaffRenderer(theme, , s);
                await loadTheme;
                sR = new StaffRenderer(theme, new MV
                {
                    ts       = ts,
                    interval = s.PPQ * 4,
                }, s);

                var mout = await output;

                g   = new Core.Game(s, mout, ts, this);
                inp = new Mono.KeyboardMIDIInput(g);

                ctr = new ComboCounter(theme.TestFont, ts);

                loading = false;
                g.Play();
            });
        }