osu.Game.Rulesets.HoLLy/osu.Game.Rulesets.HoLLy.Hex/HexRuleset.cs

78 строки
3.0 KiB
C#
Исходник Обычный вид История

using System;
using System.Collections.Generic;
2018-03-13 21:22:45 +03:00
using osu.Framework.Graphics;
2018-03-13 23:49:59 +03:00
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
2018-03-13 21:22:45 +03:00
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.HoLLy.Hex.Mods;
2018-03-13 21:22:45 +03:00
using osu.Game.Rulesets.HoLLy.Hex.UI;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.HoLLy.Hex
{
internal class HexRuleset : Ruleset
{
2018-03-13 23:49:59 +03:00
public ResourceStore<byte[]> ResourceStore;
public TextureStore TextureStore;
2018-04-15 22:08:05 +03:00
public override string Description => "Polygon";
2018-03-13 21:22:45 +03:00
public override string ShortName => "holly.hex";
2018-03-13 23:49:59 +03:00
public HexRuleset(RulesetInfo f = null) : base(f)
{
2018-04-15 22:08:05 +03:00
ResourceStore = new NamespacedResourceStore<byte[]>(new DllResourceStore("osu.Game.Rulesets.HoLLy.Polygon.dll"), "Resources");
2018-03-13 23:49:59 +03:00
TextureStore = new TextureStore(new RawTextureLoaderStore(new NamespacedResourceStore<byte[]>(ResourceStore, "Textures")));
}
2018-03-13 21:22:45 +03:00
public override IEnumerable<Mod> GetModsFor(ModType type)
{
switch (type) {
case ModType.DifficultyReduction:
return new Mod[] {
2018-04-16 21:14:21 +03:00
new HexModEasy(),
2018-03-22 19:37:08 +03:00
new HexModNoFail(),
new MultiMod {
Mods = new Mod[] {
new HexModHalfTime(),
new HexModDaycore(),
}
}
};
case ModType.DifficultyIncrease:
2018-03-22 19:37:08 +03:00
return new Mod[] {
2018-04-16 21:14:21 +03:00
new HexModHardRock(),
2018-03-22 19:37:08 +03:00
new HexModPerfect(),
new MultiMod {
Mods = new Mod[] {
new HexModDoubleTime(),
new HexModNightcore(),
}
2018-04-16 21:14:21 +03:00
},
new MultiMod {
Mods = new Mod[] {
new HexModHidden(),
new HexModFadeIn(),
}
},
2018-03-22 19:37:08 +03:00
};
case ModType.Special:
2018-04-15 19:42:29 +03:00
return new Mod[] {
2018-04-16 21:14:21 +03:00
new HexMultiModLaneCount(),
new HexModRelax(),
new HexModMaiMai(),
2018-04-15 19:42:29 +03:00
};
default:
throw new ArgumentOutOfRangeException(nameof(type), type, null);
}
}
2018-03-13 21:22:45 +03:00
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap, Mod[] mods = null) => new HexDifficultyCalculator();
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap, bool isForCurrentRuleset) => new HexRulesetContainer(this, beatmap, isForCurrentRuleset);
public override Drawable CreateIcon() => new SpriteIcon {Icon = FontAwesome.fa_futbol_o};
}
}