RotationAbsolute -> BidirectionalRotation

This commit is contained in:
iiSaLMaN
2019-09-08 16:13:36 +03:00
parent f51ff55328
commit 3d8b27abfa
3 changed files with 7 additions and 6 deletions

View File

@ -82,11 +82,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private float lastAngle;
private float currentRotation;
public float RotationAbsolute;
public float BidirectionalRotation;
private int completeTick;
private bool updateCompleteTick() => completeTick != (completeTick = (int)(RotationAbsolute / 360));
private bool updateCompleteTick() => completeTick != (completeTick = (int)(BidirectionalRotation / 360));
private bool rotationTransferred;
protected override void Update()
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
lastAngle -= 360;
currentRotation += thisAngle - lastAngle;
RotationAbsolute += Math.Abs(thisAngle - lastAngle);
BidirectionalRotation += Math.Abs(thisAngle - lastAngle) * Math.Sign(Time.Current - lastTime);
}
lastAngle = thisAngle;