mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 08:03:52 +09:00
Style & const fix
This commit is contained in:
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
};
|
};
|
||||||
scoreProcessor.Combo.ValueChanged += val => {
|
scoreProcessor.Combo.ValueChanged += val => {
|
||||||
if (val > 0 && val % 30 == 0)
|
if (val > 0 && val % 30 == 0)
|
||||||
flashlight.TriggerNPC();
|
flashlight.TriggerNpc();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
private Drawable randomNpc;
|
private Drawable randomNpc;
|
||||||
private const float npc_movement_start = 1.5f;
|
private const float npc_movement_start = 1.5f;
|
||||||
private float npcPosition = npc_movement_start;
|
private float npcPosition = npc_movement_start;
|
||||||
private bool animatingNPC;
|
private bool animatingNpc;
|
||||||
private Random random;
|
private Random random;
|
||||||
|
|
||||||
private ISkinSource skin;
|
private ISkinSource skin;
|
||||||
@ -164,12 +164,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
float ret;
|
float ret;
|
||||||
if (modEasy)
|
if (modEasy)
|
||||||
{
|
{
|
||||||
float multiplier = 0.95f;
|
const float multiplier = 0.95f;
|
||||||
ret = value * multiplier;
|
ret = value * multiplier;
|
||||||
}
|
}
|
||||||
else if (modHardrock)
|
else if (modHardrock)
|
||||||
{
|
{
|
||||||
float multiplier = 1.1f;
|
const float multiplier = 1.1f;
|
||||||
ret = value * multiplier;
|
ret = value * multiplier;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -215,9 +215,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
bgRandomNpc.X = adjustedNpcPosition;
|
bgRandomNpc.X = adjustedNpcPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerNPC()
|
public void TriggerNpc()
|
||||||
{
|
{
|
||||||
if (animatingNPC)
|
if (animatingNpc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool left = (random.Next() & 1) != 0;
|
bool left = (random.Next() & 1) != 0;
|
||||||
@ -257,9 +257,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ChangeChildDepth(panelRight, fg_panel_depth);
|
ChangeChildDepth(panelRight, fg_panel_depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
animatingNPC = true;
|
animatingNpc = true;
|
||||||
npcPosition = start;
|
npcPosition = start;
|
||||||
this.TransformTo(nameof(npcPosition), end, 3000, Easing.OutSine).Finally(_ => animatingNPC = false);
|
this.TransformTo(nameof(npcPosition), end, 3000, Easing.OutSine).Finally(_ => animatingNpc = false);
|
||||||
|
|
||||||
targetClamp = 1;
|
targetClamp = 1;
|
||||||
this.Delay(600).TransformTo(nameof(targetClamp), 0.6f, 300).Delay(500).TransformTo(nameof(targetClamp), 1f, 300);
|
this.Delay(600).TransformTo(nameof(targetClamp), 0.6f, 300).Delay(500).TransformTo(nameof(targetClamp), 1f, 300);
|
||||||
|
Reference in New Issue
Block a user