private void InitSprites() { _background = new MovingBackground { Direction = Math.PI / 4, Speed = 30, Texture = TextureManager.Textures("MovingBackground1"), Size = Core.Metrics["ScreenBackground.Size", 0], Position = Core.Metrics["ScreenBackground", 0], }; _instructionPages = new Sprite3D[TOTAL_PAGES]; for (int x = 0; x < TOTAL_PAGES; x++) { _instructionPages[x] = new Sprite3D { Texture = TextureManager.Textures("InstructionPage" + (x + 1)), Size = new Vector2(GameCore.INTERNAL_WIDTH, GameCore.INTERNAL_HEIGHT) }; } _baseSprite = new Sprite3D { Texture = TextureManager.Textures("LoadingMessageBase"), Position = (Core.Metrics["LoadMessageBase", 0]), Size = Core.Metrics["LoadMessageBase.Size", 0] }; _beatline = new Beatline { Bpm = BEATLINE_BPM, Id = 0, Position = Core.Metrics["InstructionBeatline", 0], Size = Core.Metrics["InstructionBeatline.Size", 0], Speed = 1.0, }; }
static void Main(string[] args) { Console.WriteLine("Starting..."); List <Uri> targets = Baseline.ToUriList(args); Baseline baseline = new Baseline(targets, 1500); Beatline beatline = new Beatline(); Console.WriteLine("Baseline contain(s) " + baseline.Count.ToString() + " node(s)"); ConsoleCrawlRecorder consoleListener = new ConsoleCrawlRecorder(); BeatCrawlRecorder recorder = new BeatCrawlRecorder(beatline); MultiplexCrawlRecorder listener = new MultiplexCrawlRecorder(new ICrawlRecorder[] { consoleListener, recorder }); Spider spider = new Spider(baseline, new Pruner(targets, listener, 10), listener); Console.WriteLine("Spider initialized."); do { spider.Crawl(); Console.WriteLine("--> Baseline contain(s) " + baseline.Count.ToString() + " node(s)"); Console.WriteLine("--> Beatline contain(s) " + beatline.Count.ToString() + " beat(s)"); if (beatline.Count > 0) { Console.WriteLine("--> Last beat contain(s) " + beatline[beatline.Count - 1].Count.ToString() + " node(s)"); } Console.WriteLine("--> press a key to exit"); System.Threading.Thread.Sleep(5000); } while (!Console.KeyAvailable); spider.Stop(); Console.WriteLine("End."); }
public BeatlineSet(MetricsManager metrics, Player[] players, GameType gameType) : base(metrics, players, gameType) { _beatlines = new Beatline[4]; var visibleCount = 0; AddNotes = new List <double>(); RemoveNotes = new List <double>(); SuperNotes = new List <double>(); for (int x = 0; x < 4; x++) { _beatlines[x] = new Beatline { //Beatlines are arranged differently for SYNC_PRO mode. Position = SyncGameType ? _metrics["SyncBeatlineBarBase", visibleCount]: (_metrics["BeatlineBarBase", x]), Size = new Vector2(350, 125), Id = x, IdentifierSize = _metrics["BeatlinePlayerIdentifiers.Size", 0], EffectIconSize = _metrics["BeatlineEffectIcons.Size", 0] }; if (Players[x].Playing) { visibleCount++; } } }
private static void GenerateBPMChangeNotes(GameSong song, Beatline bl) { double prev = song.BPMs[0.0]; foreach (double bpmKey in song.BPMs.Keys) { //Don't mark the starting BPM as a BPM change. if (bpmKey == 0.0) { continue; } //Don't mark a BPM change if there isn't actually a change in the BPM. if (song.BPMs[bpmKey] == prev) { continue; } var noteType = song.BPMs[bpmKey] > prev ? BeatlineNoteType.BPMIncrease : BeatlineNoteType.BPMDecrease; bl.InsertBeatlineNote(new BeatlineNote { NoteType = noteType, Position = bpmKey }, 0); prev = song.BPMs[bpmKey]; } }
private void GenerateStandardNotes(GameSong song, Beatline bl) { // Add a beatline note for every phrase (4 beats), unless its listed in the // RemoveNotes or SuperNotes collection. for (int beat = 0; beat < song.GetEndingTimeInPhrase(); beat++) { if (song.RemoveNotes.Contains(beat)) { continue; } if (song.SuperNotes.Contains(beat)) { continue; } bl.AddBeatlineNote(new BeatlineNote { Position = beat }); } foreach (var pos in song.AddNotes) { bl.AddBeatlineNote(new BeatlineNote { Position = pos }); } foreach (var pos in song.SuperNotes) { bl.AddBeatlineNote(new BeatlineNote { Position = pos, NoteType = BeatlineNoteType.Super }); } }
private void GenerateSongEndNote(GameSong song, Beatline bl) { bl.AddBeatlineNote(new BeatlineNote { NoteType = BeatlineNoteType.EndOfSong, Position = song.GetEndingTimeInPhrase() }); }
private static void GenerateStopNotes(GameSong song, Beatline bl) { foreach (var stopKey in song.Stops.Keys) { bl.InsertBeatlineNote( new BeatlineNote { NoteType = BeatlineNoteType.Stop, Position = stopKey }, 0); } }