Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
        /// <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);
        }