Style & const fix

This commit is contained in:
WebFreak001
2018-09-16 12:57:54 +02:00
parent 91b25870ef
commit 633e8fafee
2 changed files with 8 additions and 8 deletions

View File

@ -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();
}; };
} }
} }

View File

@ -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);