mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Add support for old marker style danger textures
This commit is contained in:
@ -84,17 +84,42 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
public class LegacyOldStyleMarker : LegacyMarker
|
public class LegacyOldStyleMarker : LegacyMarker
|
||||||
{
|
{
|
||||||
|
private readonly Sprite sprite;
|
||||||
|
|
||||||
|
private readonly Texture normalTexture;
|
||||||
|
private readonly Texture dangerTexture;
|
||||||
|
private readonly Texture superDangerTexture;
|
||||||
|
|
||||||
public LegacyOldStyleMarker(Skin skin)
|
public LegacyOldStyleMarker(Skin skin)
|
||||||
{
|
{
|
||||||
|
normalTexture = getTexture(skin, "ki");
|
||||||
|
dangerTexture = getTexture(skin, "kidanger");
|
||||||
|
superDangerTexture = getTexture(skin, "kidanger2");
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new Sprite
|
sprite = new Sprite
|
||||||
{
|
{
|
||||||
Texture = getTexture(skin, "ki"),
|
Texture = getTexture(skin, "ki"),
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
Current.BindValueChanged(hp =>
|
||||||
|
{
|
||||||
|
if (hp.NewValue < 0.2f)
|
||||||
|
sprite.Texture = superDangerTexture;
|
||||||
|
else if (hp.NewValue < 0.5f)
|
||||||
|
sprite.Texture = dangerTexture;
|
||||||
|
else
|
||||||
|
sprite.Texture = normalTexture;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LegacyNewStyleMarker : LegacyMarker
|
public class LegacyNewStyleMarker : LegacyMarker
|
||||||
|
Reference in New Issue
Block a user