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

71 строка
2.8 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.Difficulty;
2018-05-11 00:04:12 +03:00
using osu.Game.Rulesets.HoLLy.Hex.Beatmaps;
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
{
2018-06-19 19:52:13 +03:00
public class HexRuleset : Ruleset
2018-03-13 21:22:45 +03:00
{
2018-10-27 19:30:50 +03:00
public readonly ResourceStore<byte[]> ResourceStore;
public readonly TextureStore TextureStore;
2018-03-13 23:49:59 +03:00
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");
TextureStore = new TextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(ResourceStore, "Textures")));
2018-03-13 23:49:59 +03:00
}
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(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(new HexModDoubleTime(), new HexModNightcore()),
new MultiMod(new HexModHidden(), new HexModFadeIn()),
2018-03-22 19:37:08 +03:00
};
case ModType.Conversion:
2018-04-15 19:42:29 +03:00
return new Mod[] {
2018-04-16 21:14:21 +03:00
new HexMultiModLaneCount(),
new HexModMaiMai(),
2018-04-15 19:42:29 +03:00
};
case ModType.Automation:
return new Mod[] {
new HexModRelax(),
};
case ModType.Fun: return new Mod[0];
default:
throw new ArgumentOutOfRangeException(nameof(type), type, null);
}
}
2018-03-13 21:22:45 +03:00
public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new HexDifficultyCalculator(this, beatmap);
2018-03-13 21:22:45 +03:00
2018-05-11 00:04:12 +03:00
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap) => new HexRulesetContainer(this, beatmap);
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new HexBeatmapConverter(beatmap);
2018-03-13 21:22:45 +03:00
public override Drawable CreateIcon() => new SpriteIcon {Icon = FontAwesome.fa_futbol_o};
}
}