Example #1
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int beats       = HitObjects.Count(b => b.GetType() == typeof(Tap));
            int holds       = HitObjects.Count(h => h is Hold);
            int centreHolds = HitObjects.Count(h => h is TouchHold);
            int breaks      = HitObjects.Count(h => h is Break);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = "Tap Count",
                    Content = beats.ToString(),
                    Icon = FontAwesome.Solid.Circle
                },
                new BeatmapStatistic
                {
                    Name = "Hold Count",
                    Content = holds.ToString(),
                    Icon = FontAwesome.Solid.Circle
                },
                new BeatmapStatistic
                {
                    Name = "Spinner Hold Count",
                    Content = centreHolds.ToString(),
                    Icon = FontAwesome.Solid.Circle
                },
                new BeatmapStatistic
                {
                    Name = "Break Count",
                    Content = breaks.ToString(),
                    Icon = FontAwesome.Solid.Circle
                },
            });
        }
Example #2
0
        /// <summary>
        /// Adds a DrawableHitObject to this Playfield.
        /// </summary>
        /// <param name="hitObject">The DrawableHitObject to add.</param>
        public override void Add(DrawableHitObject hitObject)
        {
            hitObject.AccentColour = AccentColour;
            hitObject.OnNewResult += OnNewResult;

            HitObjects.Add(hitObject);
        }
Example #3
0
 public void LoadHitObjects()
 {
     if (Timer.Ticks < Duration.TotalMilliseconds && Timer.IsStarted == true)
     {
         foreach (HitObject o in Level.Beatmap.HitObjects)
         {
             if (Timer.Ticks == o.StartTime - (Level.Beatmap.DifficultyApproachRate * Speed[0]))
             {
                 int index = HitObjects.FindIndex(f => f.X == o.StartPosition.X);
                 if (index == -1)
                 {
                     TotalHits++;
                     HitObjects.Add(new Cube(DefaultColor, o.StartPosition.X, -50, Size, Size, false, false));
                     Random gen = new Random();
                     if (gen.Next(100) < 40)
                     {
                         HitObjects.Add(new Cube(DefaultColor, o.StartPosition.X + 10, -150, 20, 20, false, true));
                     }
                 }
             }
         }
     }
     else if (Timer.Ticks > Duration.TotalMilliseconds && State.GetType() != typeof(GameEnded))
     {
         Timer.Stop();
         SplashKit.StopMusic();
         SetState(new GameEnded());
     }
 }
Example #4
0
 public void LoadLevel(bool player)
 {
     Modifier.modifyGame();
     HitObjects.Clear();
     Objects.Clear();
     HP.Clear();
     Score = 0;
     Combo = 0;
     Lives = Modifier.Lives();
     Block.RegisterBlock("Platform", typeof(Platform));
     Block.RegisterBlock("Player", typeof(Player));
     Objects.Add(Block.CreateBlock("Platform", 100, 10, 0, 525, DefaultColor));
     Objects.Add(Block.CreateBlock("Platform", 100, 10, 700, 525, DefaultColor));
     Objects.Add(Block.CreateBlock("Platform", 100, 10, 150, 450, DefaultColor));
     Objects.Add(Block.CreateBlock("Platform", 100, 10, 550, 450, DefaultColor));
     Objects.Add(Block.CreateBlock("Platform", 200, 10, 300, 375, DefaultColor));
     HP.Add(new HP(Color.OrangeRed, 25, 490, 50, 25, false, "HP"));
     HP.Add(new HP(Color.OrangeRed, 725, 490, 50, 25, false, "HP"));
     HP.Add(new HP(Color.OrangeRed, 175, 415, 50, 25, false, "HP"));
     HP.Add(new HP(Color.OrangeRed, 575, 415, 50, 25, false, "HP"));
     HP.Add(new HP(Color.IndianRed, 375, 340, 50, 25, false, "MAX"));
     if (player)
     {
         Objects.Add(Block.CreateBlock("Player", 75, 50, 200, 550, Color.OrangeRed));
     }
 }
Example #5
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int fruits        = HitObjects.Count(s => s is Fruit);
            int juiceStreams  = HitObjects.Count(s => s is JuiceStream);
            int bananaShowers = HitObjects.Count(s => s is BananaShower);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"圆圈数",
                    Content = fruits.ToString(),
                    Icon = FontAwesome.Regular.Circle
                },
                new BeatmapStatistic
                {
                    Name = @"滑条数",
                    Content = juiceStreams.ToString(),
                    Icon = FontAwesome.Regular.Circle
                },
                new BeatmapStatistic
                {
                    Name = @"转盘数",
                    Content = bananaShowers.ToString(),
                    Icon = FontAwesome.Regular.Circle
                }
            });
        }
Example #6
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int singers = Singers.Length;
            int lyrics  = HitObjects.Count(s => s is Lyric);

            var defaultStatistic = new List <BeatmapStatistic>
            {
                new BeatmapStatistic
                {
                    Name       = @"Singer",
                    Content    = singers.ToString(),
                    CreateIcon = () => new SpriteIcon {
                        Icon = FontAwesome.Solid.User
                    }
                },
                new BeatmapStatistic
                {
                    Name       = @"Lyric",
                    Content    = lyrics.ToString(),
                    CreateIcon = () => new SpriteIcon {
                        Icon = FontAwesome.Solid.AlignLeft
                    }
                },
            };

            var scorable = this.IsScorable();

            if (scorable)
            {
                int notes = HitObjects.Count(s => s is Note {
                    Display: true
                });
Example #7
0
        /// <summary>
        /// Adds a DrawableHitObject to this Playfield.
        /// </summary>
        /// <param name="hitObject">The DrawableHitObject to add.</param>
        public override void Add(DrawableHitObject hitObject)
        {
            hitObject.AccentColour = AccentColour;
            hitObject.OnJudgement += OnJudgement;

            HitObjects.Add(hitObject);
        }
Example #8
0
 /// <summary>
 ///     Returns true if the two maps are equal by value.
 /// </summary>
 /// <param name="other">the Qua to compare to</param>
 /// <returns></returns>
 public bool EqualByValue(Qua other)
 {
     return(AudioFile == other.AudioFile &&
            SongPreviewTime == other.SongPreviewTime &&
            BackgroundFile == other.BackgroundFile &&
            BannerFile == other.BannerFile &&
            MapId == other.MapId &&
            MapSetId == other.MapSetId &&
            Mode == other.Mode &&
            Title == other.Title &&
            Artist == other.Artist &&
            Source == other.Source &&
            Tags == other.Tags &&
            Creator == other.Creator &&
            DifficultyName == other.DifficultyName &&
            Description == other.Description &&
            Genre == other.Genre &&
            TimingPoints.SequenceEqual(other.TimingPoints, TimingPointInfo.ByValueComparer) &&
            SliderVelocities.SequenceEqual(other.SliderVelocities, SliderVelocityInfo.ByValueComparer) &&
            HitObjects.SequenceEqual(other.HitObjects, HitObjectInfo.ByValueComparer) &&
            CustomAudioSamples.SequenceEqual(other.CustomAudioSamples, CustomAudioSampleInfo.ByValueComparer) &&
            SoundEffects.SequenceEqual(other.SoundEffects, SoundEffectInfo.ByValueComparer) &&
            EditorLayers.SequenceEqual(other.EditorLayers, EditorLayerInfo.ByValueComparer) &&
            RandomizeModifierSeed == other.RandomizeModifierSeed);
 }
Example #9
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int hits      = HitObjects.Count(s => s is Hit);
            int drumrolls = HitObjects.Count(s => s is DrumRoll);
            int swells    = HitObjects.Count(s => s is Swell);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"按鍵數",
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
                    Content = hits.ToString(),
                },
                new BeatmapStatistic
                {
                    Name = @"連打鼓數",
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
                    Content = drumrolls.ToString(),
                },
                new BeatmapStatistic
                {
                    Name = @"放大鼓數", // [RequestImprove] Swell Count
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
                    Content = swells.ToString(),
                }
            });
        }
Example #10
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int beats     = HitObjects.Count(b => b is Beat);
            int hardbeats = HitObjects.Count(b => b is HardBeat);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = "Beat count",
                    Content = beats.ToString(),
                    CreateIcon = () => new SpriteIcon
                    {
                        Icon = FontAwesome.Solid.Square,
                        Scale = new Vector2(.7f)
                    },
                },
                new BeatmapStatistic
                {
                    Name = "HardBeat count",
                    Content = hardbeats.ToString(),
                    CreateIcon = () => new SpriteIcon
                    {
                        Icon = FontAwesome.Regular.Circle,
                        Scale = new Vector2(.7f)
                    },
                }
            });
        }
Example #11
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int circles  = HitObjects.Count(c => c is HitCircle);
            int sliders  = HitObjects.Count(s => s is Slider);
            int spinners = HitObjects.Count(s => s is Spinner);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Circle Count",
                    Content = circles.ToString(),
                    Icon = FontAwesome.fa_circle_o
                },
                new BeatmapStatistic
                {
                    Name = @"Slider Count",
                    Content = sliders.ToString(),
                    Icon = FontAwesome.fa_circle
                },
                new BeatmapStatistic
                {
                    Name = @"Spinner Count",
                    Content = spinners.ToString(),
                    Icon = FontAwesome.fa_circle
                }
            });
        }
Example #12
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int hits      = HitObjects.Count(s => s is Hit);
            int drumrolls = HitObjects.Count(s => s is DrumRoll);
            int swells    = HitObjects.Count(s => s is Swell);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Hit Count",
                    Content = hits.ToString(),
                    Icon = FontAwesome.fa_circle_o
                },
                new BeatmapStatistic
                {
                    Name = @"Drumroll Count",
                    Content = drumrolls.ToString(),
                    Icon = FontAwesome.fa_circle
                },
                new BeatmapStatistic
                {
                    Name = @"Swell Count",
                    Content = swells.ToString(),
                    Icon = FontAwesome.fa_circle
                }
            });
        }
Example #13
0
        /// <summary>
        /// Adds a DrawableHitObject to this Playfield.
        /// </summary>
        /// <param name="hitObject">The DrawableHitObject to add.</param>
        public override void Add(DrawableHitObject hitObject)
        {
            hitObject.Depth = (float)hitObject.HitObject.StartTime;

            hitObject.AccentColour = AccentColour;
            HitObjects.Add(hitObject);
        }
Example #14
0
 /// <summary>
 ///     Does some sorting of the Qua
 /// </summary>
 public void Sort()
 {
     HitObjects       = HitObjects.OrderBy(x => x.StartTime).ToList();
     TimingPoints     = TimingPoints.OrderBy(x => x.StartTime).ToList();
     SliderVelocities = SliderVelocities.OrderBy(x => x.StartTime).ToList();
     SoundEffects     = SoundEffects.OrderBy(x => x.StartTime).ToList();
 }
Example #15
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int circles  = HitObjects.Count(c => c is HitCircle);
            int sliders  = HitObjects.Count(s => s is Slider);
            int spinners = HitObjects.Count(s => s is Spinner);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = BeatmapsetsStrings.ShowStatsCountCircles,
                    Content = circles.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
                },
                new BeatmapStatistic
                {
                    Name = BeatmapsetsStrings.ShowStatsCountSliders,
                    Content = sliders.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
                },
                new BeatmapStatistic
                {
                    Name = @"Spinner Count",
                    Content = spinners.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
                }
            });
        }
Example #16
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int fruits        = HitObjects.Count(s => s is Fruit);
            int juiceStreams  = HitObjects.Count(s => s is JuiceStream);
            int bananaShowers = HitObjects.Count(s => s is BananaShower);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Fruit Count",
                    Content = fruits.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
                },
                new BeatmapStatistic
                {
                    Name = @"Juice Stream Count",
                    Content = juiceStreams.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
                },
                new BeatmapStatistic
                {
                    Name = @"Banana Shower Count",
                    Content = bananaShowers.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
                }
            });
        }
Example #17
0
 /// <summary>
 ///     Returns true if the two maps are equal by value.
 /// </summary>
 /// <param name="other">the Qua to compare to</param>
 /// <returns></returns>
 public bool EqualByValue(Qua other)
 {
     return(AudioFile == other.AudioFile &&
            SongPreviewTime == other.SongPreviewTime &&
            BackgroundFile == other.BackgroundFile &&
            BannerFile == other.BannerFile &&
            MapId == other.MapId &&
            MapSetId == other.MapSetId &&
            Mode == other.Mode &&
            Title == other.Title &&
            Artist == other.Artist &&
            Source == other.Source &&
            Tags == other.Tags &&
            Creator == other.Creator &&
            DifficultyName == other.DifficultyName &&
            Description == other.Description &&
            Genre == other.Genre &&
            TimingPoints.SequenceEqual(other.TimingPoints, TimingPointInfo.ByValueComparer) &&
            SliderVelocities.SequenceEqual(other.SliderVelocities, SliderVelocityInfo.ByValueComparer)
            // ReSharper disable once CompareOfFloatsByEqualityOperator
            && InitialScrollVelocity == other.InitialScrollVelocity &&
            BPMDoesNotAffectScrollVelocity == other.BPMDoesNotAffectScrollVelocity &&
            HasScratchKey == other.HasScratchKey &&
            HitObjects.SequenceEqual(other.HitObjects, HitObjectInfo.ByValueComparer) &&
            CustomAudioSamples.SequenceEqual(other.CustomAudioSamples, CustomAudioSampleInfo.ByValueComparer) &&
            SoundEffects.SequenceEqual(other.SoundEffects, SoundEffectInfo.ByValueComparer) &&
            EditorLayers.SequenceEqual(other.EditorLayers, EditorLayerInfo.ByValueComparer) &&
            RandomizeModifierSeed == other.RandomizeModifierSeed);
 }
Example #18
0
        public override IEnumerable<BeatmapStatistic> GetStatistics()
        {
            int fruits = HitObjects.Count(s => s is Fruit);
            int juiceStreams = HitObjects.Count(s => s is JuiceStream);
            int bananaShowers = HitObjects.Count(s => s is BananaShower);

            return new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Fruit Count",
                    Content = fruits.ToString(),
                    Icon = FontAwesome.fa_circle_o
                },
                new BeatmapStatistic
                {
                    Name = @"Juice Stream Count",
                    Content = juiceStreams.ToString(),
                    Icon = FontAwesome.fa_circle
                },
                new BeatmapStatistic
                {
                    Name = @"Banana Shower Count",
                    Content = bananaShowers.ToString(),
                    Icon = FontAwesome.fa_circle
                }
            };
        }
Example #19
0
        /// <summary>
        ///     Adds a HitObject sprite to the container.
        /// </summary>
        public void AddHitObjectSprite(HitObjectInfo h)
        {
            DrawableEditorHitObject hitObject;

            var skin  = SkinManager.Skin.Keys[Ruleset.WorkingMap.Mode];
            var index = skin.ColorObjectsBySnapDistance ? HitObjectManager.GetBeatSnap(h, h.GetTimingPoint(Ruleset.WorkingMap.TimingPoints)) : 0;

            if (h.IsLongNote)
            {
                if (ConfigManager.EditorViewLayers.Value)
                {
                    hitObject = new DrawableEditorHitObjectLong(this, h,
                                                                skin.EditorLayerNoteHitObjects[h.Lane - 1],
                                                                skin.EditorLayerNoteHoldBodies[h.Lane - 1],
                                                                skin.EditorLayerNoteHoldEnds[h.Lane - 1]);
                }
                else
                {
                    hitObject = new DrawableEditorHitObjectLong(this, h,
                                                                skin.NoteHoldHitObjects[h.Lane - 1][index],
                                                                skin.NoteHoldBodies[h.Lane - 1].First(),
                                                                skin.NoteHoldEnds[h.Lane - 1]);
                }
            }
            else
            {
                if (ConfigManager.EditorViewLayers.Value)
                {
                    hitObject = new DrawableEditorHitObject(this, h, skin.EditorLayerNoteHitObjects[h.Lane - 1]);
                }
                else
                {
                    hitObject = new DrawableEditorHitObject(this, h, skin.NoteHitObjects[h.Lane - 1][index]);
                }
            }

            hitObject.Alignment = Alignment.TopLeft;
            hitObject.X         = ScreenRectangle.X + LaneSize * (h.Lane - 1) + DividerLineWidth;
            hitObject.Width     = LaneSize - DividerLineWidth;

            // Make sure the width of the long note is updated if this object is indeed an LN.
            if (hitObject is DrawableEditorHitObjectLong longNote)
            {
                longNote.Body.Width = hitObject.Width;
                longNote.Tail.Width = hitObject.Width;
            }

            hitObject.AppearAsActive();

            // Check if the layer is hidden that the user is adding the object to and display the object
            // as that appropriate colour.
            if (((EditorScreenView)Ruleset.Screen.View).LayerCompositor.ScrollContainer.AvailableItems[hitObject.Info.EditorLayer].Hidden)
            {
                hitObject.AppearAsHiddenInLayer();
            }

            lock (HitObjects)
                HitObjects.Add(hitObject);
        }
Example #20
0
        protected override void DoWeaponFireNinja(Vector2 startPos, Vector2 direction)
        {
            HitObjects.Clear();
            NinjaStat.ActivationDirection = direction;
            NinjaStat.CurrentMoveTime     = ServerData.Weapons.Ninja.MoveTime * Server.TickSpeed / 1000;
            NinjaStat.OldVelAmount        = Core.Velocity.Length;

            GameContext.CreateSound(Position, Sound.NinjaFire);
        }
Example #21
0
        /// <summary>
        ///     Resizes a long note with that given hitobject info.
        /// </summary>
        /// <param name="h"></param>
        public DrawableEditorHitObjectLong ResizeLongNote(HitObjectInfo h)
        {
            var note = HitObjects.Find(x => x.Info == h);

            if (note is DrawableEditorHitObjectLong n)
            {
                n.ResizeLongNote();
            }

            return(note as DrawableEditorHitObjectLong);
        }
Example #22
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int singers = Singers.Length;
            int lyrics  = HitObjects.Count(s => s is Lyric);

            var defaultStatistic = new List <BeatmapStatistic>
            {
                new BeatmapStatistic
                {
                    Name       = @"Singer",
                    Content    = singers.ToString(),
                    CreateIcon = () => new SpriteIcon {
                        Icon = FontAwesome.Solid.User
                    }
                },
                new BeatmapStatistic
                {
                    Name       = @"Lyric",
                    Content    = lyrics.ToString(),
                    CreateIcon = () => new SpriteIcon {
                        Icon = FontAwesome.Solid.AlignLeft
                    }
                },
            };

            var scorable = this.IsScorable();

            if (scorable)
            {
                int notes = HitObjects.Count(s => s is Note note && note.Display);
                defaultStatistic.Add(new BeatmapStatistic
                {
                    Name       = @"Note",
                    Content    = notes.ToString(),
                    CreateIcon = () => new SpriteIcon {
                        Icon = FontAwesome.Solid.Music
                    }
                });
            }
            else
            {
                defaultStatistic.Add(new BeatmapStatistic
                {
                    Name       = @"This beatmap is not scorable.",
                    Content    = @"This beatmap is not scorable.",
                    CreateIcon = () => new SpriteIcon {
                        Icon = FontAwesome.Solid.Times
                    }
                });
            }

            return(defaultStatistic.ToArray());
        }
Example #23
0
 private void recalculateStackCoordinates()
 {
     HitObjects.ForEach(o => o.StackHeight = 0);
     if (Format >= 6)
     {
         applyStacking();
     }
     else
     {
         applyStackingOld();
     }
 }
Example #24
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            var totalCount = HitObjects.Count();

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Cherry Count",
                    Content = totalCount.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles)
                }
            });
        }
Example #25
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int lyrics = HitObjects.Count(s => s is LyricLine);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Lyric",
                    Content = lyrics.ToString(),
                    Icon = FontAwesome.Regular.Circle
                },
            });
        }
Example #26
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int taps       = HitObjects.Count(b => b is Tap);
            int holds      = HitObjects.Count(h => h is Hold);
            int touchHolds = HitObjects.Count(h => h is TouchHold);
            int touchs     = HitObjects.Count(h => h is Touch);
            int slides     = HitObjects.Count(h => h is Slide);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = "Tap Count",
                    Content = taps.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
                },
                new BeatmapStatistic
                {
                    Name = "Hold Count",
                    Content = holds.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
                },
                new BeatmapStatistic
                {
                    Name = "TouchHold Count",
                    Content = touchHolds.ToString(),
                    CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
                },
                new BeatmapStatistic
                {
                    Name = "Touch Count",
                    Content = touchs.ToString(),
                    CreateIcon = () => new SpriteIcon
                    {
                        Icon = FontAwesome.Regular.HandPointRight,
                        Scale = new Vector2(.7f)
                    },
                },
                new BeatmapStatistic
                {
                    Name = "Slide Count",
                    Content = slides.ToString(),
                    CreateIcon = () => new SpriteIcon
                    {
                        Icon = FontAwesome.Regular.Star,
                        Scale = new Vector2(.7f)
                    },
                },
            });
        }
Example #27
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int minions    = HitObjects.Count(s => s is Minion);
            int notesheets = HitObjects.Count(s => s is NoteSheet);
            int sawblades  = HitObjects.Count(s => s is Sawblade);
            int dualhits   = HitObjects.Count(s => s is DualHit);
            int minibosses = HitObjects.Count(s => s is MiniBoss);
            int hearts     = HitObjects.Count(s => s is Heart);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Minion Count",
                    Content = minions.ToString(),
                    Icon = FontAwesome.Regular.Angry
                },
                new BeatmapStatistic
                {
                    Name = @"Notesheet Count",
                    Content = notesheets.ToString(),
                    Icon = FontAwesome.Regular.Star
                },
                new BeatmapStatistic
                {
                    Name = @"Dual Hit Count",
                    Content = dualhits.ToString(),
                    Icon = FontAwesome.Solid.Cog
                },
                new BeatmapStatistic
                {
                    Name = @"Sawblade Count",
                    Content = sawblades.ToString(),
                    Icon = FontAwesome.Solid.Sun
                },
                new BeatmapStatistic
                {
                    Name = @"Miniboss Count",
                    Content = minibosses.ToString(),
                    Icon = FontAwesome.Solid.Mitten
                },
                new BeatmapStatistic
                {
                    Name = @"Heart Count",
                    Content = hearts.ToString(),
                    Icon = FontAwesome.Solid.Heart
                }
            });
        }
Example #28
0
        public override IEnumerable <BeatmapStatistic> GetStatistics()
        {
            int minions    = HitObjects.Count(s => s is Minion);
            int starsheets = HitObjects.Count(s => s is StarSheet);
            int sawblades  = HitObjects.Count(s => s is Sawblade);
            int dualhits   = HitObjects.Count(s => s is DualHit);
            int minibosses = HitObjects.Count(s => s is MiniBoss);
            int hearts     = HitObjects.Count(s => s is Heart);

            return(new[]
            {
                new BeatmapStatistic
                {
                    Name = @"Minion Count",
                    Content = minions.ToString(),
                    CreateIcon = () => createIcon(FontAwesome.Regular.Angry),
                },
                new BeatmapStatistic
                {
                    Name = @"Star Sheet Count",
                    Content = starsheets.ToString(),
                    CreateIcon = () => createIcon(FontAwesome.Regular.Star),
                },
                new BeatmapStatistic
                {
                    Name = @"Dual Hit Count",
                    Content = dualhits.ToString(),
                    CreateIcon = () => createIcon(FontAwesome.Solid.Cog),
                },
                new BeatmapStatistic
                {
                    Name = @"Sawblade Count",
                    Content = sawblades.ToString(),
                    CreateIcon = () => createIcon(FontAwesome.Solid.Sun),
                },
                new BeatmapStatistic
                {
                    Name = @"Miniboss Count",
                    Content = minibosses.ToString(),
                    CreateIcon = () => createIcon(FontAwesome.Solid.Mitten),
                },
                new BeatmapStatistic
                {
                    Name = @"Heart Count",
                    Content = hearts.ToString(),
                    CreateIcon = () => createIcon(FontAwesome.Solid.Heart),
                }
            });
        }
Example #29
0
 /// <summary>
 /// Adds the provided HitObject to this Column
 /// </summary>
 /// <param name="hitObject">The HitObject to add</param>
 /// <param name="speed">Current game speed</param>
 /// <param name="crosshairZLoc">The z-axis position of the Crosshair</param>
 public void AddHitObject(HitObject hitObject, double speed, float crosshairZLoc)
 {
     // If this HitObject is hittable, add it to the end of the list.
     if (hitObject.Hittable)
     {
         HitObjects.Add(hitObject);
         UpdateHitObjects.Add(new KeyValuePair <long, HitObject>(hitObject.IsSeenAt(speed, crosshairZLoc), hitObject));
     }
     // If this HitObject is not hittable (Fading Out Effect Arcs), add it to the front of the list.
     else
     {
         HitObjects.Insert(0, hitObject);
         UpdateHitObjects.Insert(0, new KeyValuePair <long, HitObject>(hitObject.IsSeenAt(speed, crosshairZLoc), hitObject));
     }
 }
Example #30
0
        /// <summary>
        ///     Called whenever an editor layer has been updated.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnEditorLayerUpdated(object sender, EditorLayerUpdatedEventArgs e)
        {
            var hitObjects = HitObjects.FindAll(x => x.Info.EditorLayer == e.Index);

            if (!e.Type.HasFlag(EditorLayerUpdateType.Visibility) && !e.Type.HasFlag(EditorLayerUpdateType.Color))
            {
                return;
            }

            if (e.Layer.Hidden)
            {
                hitObjects.ForEach(x =>
                {
                    if (Ruleset.SelectedHitObjects.Contains(x))
                    {
                        x.AppearAsSelected();
                    }
                    else if (Ruleset.PendingLongNoteReleases.Contains(x.Info))
                    {
                        var h = x as DrawableEditorHitObjectLong;
                        h?.AppearAsInactive();
                    }
                    else
                    {
                        x.AppearAsHiddenInLayer();
                    }
                });
            }
            else
            {
                hitObjects.ForEach(x =>
                {
                    if (Ruleset.SelectedHitObjects.Contains(x))
                    {
                        x.AppearAsSelected();
                    }
                    else if (Ruleset.PendingLongNoteReleases.Contains(x.Info))
                    {
                        var h = x as DrawableEditorHitObjectLong;
                        h?.AppearAsInactive();
                    }
                    else
                    {
                        x.AppearAsActive();
                    }
                });
            }
        }