/// <summary> /// Create columns from the beatmap /// </summary> /// <param name="beatmap"></param> private void CreateColumns() { // Create one column for each key being used for (int i = 1; i <= KeyCount; i++) { Columns[i - 1] = new Column(i); } int objectCount = 0; // Add arcs to the columns foreach (Arc arc in CurrentBeatmap.Arcs) { for (int i = 0; i < KeyCount; i++) { if (BeatmapHelper.IsColumn(arc, i)) { Columns[i].AddHitObject ( new HitObject(arc.Time, (int)(i / (float)KeyCount * 360), KeyCount, CurrentArcsSpeed, Hidden), CurrentArcsSpeed * CurrentSpeedMultiplier, Crosshair.GetZLocation() ); objectCount++; } } } // Compute the beatmap's highest possible score, // for displaying the current display_score later on maxScore = Scoring.GetMaxScore(objectCount); }
/// <summary> /// Load all the stats found in the config /// </summary> private void LoadConfig(Beatmap map) { // Set the offset for each play before starting audio AudioManager.offset = Config.GetInt("Audio", "GlobalOffset") + int.Parse(map.MapOffset); KeyCount = 4; // TODO: Allow maps to start at different crosshair radii Crosshair = new Crosshair(300, Hidden); }
/// <summary> /// Initialize this GameplayEngineView with new UI elements. /// </summary> public void Init() { // Initialize UI depending on skin config crosshair = GetGameplayEngine().Crosshair; AddTextDisplayElement("Score"); AddTextDisplayElement("Acc"); AddTextDisplayElement("Combo"); SetUpJudgeBox(); SetUpAccMeter(); background = GetGameplayEngine().Background; // Todo make fill direction skinnable mapTimer = new MapTimer(GetGameplayEngine().MapEndTime, FillBarDirection.UpToDown); }