-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add highway animation #823
base: dev
Are you sure you want to change the base?
Conversation
Branch needs to be based off of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I didn't look at the changes in-game yet but I pointed out some things I noticed in the code below.
Thanks again!
} | ||
|
||
private void Update() | ||
{ | ||
// Hacky animation fix; breaks text notifications if put into Initialize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely because the position of the HUD is set relative to the world space of the camera here, after Initialize
is called. In general, "hacky fixes" should be avoided when they can. A proper solution could be something such as making sure the position of the HUD is set before the camera is positioned by moving when the HUD positions are set.
var transform = this.transform; | ||
transform.localPosition = transform.localPosition.WithZ(_zOffset - 1.2f); | ||
|
||
yield return new WaitForSeconds(0.5f); | ||
yield return DOTween.Sequence() | ||
.PrependInterval(0.25f) // Total duration of sequence | ||
.Append(transform.DOMoveZ(_zOffset + 0.1f, 0.167f)).SetEase(Ease.OutCirc) | ||
.Append(transform.DOMoveZ(_zOffset, 0.083f)).SetEase(Ease.InOutSine); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These animations seem to contain a lot of magic numbers. If you could reduce the amount of them to make them easier to configure when there are changes to the underlying object (for example the position of the strikeline in this case) that'd be great. Stuff like this is already done for pro keys so it'd make it a little easier to merge there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, defined some comments at the top of the class that should make things more readable. Also noticed a small bug here.
Notes
PerformanceTextScaler
class and replaced withDOTween
implementations2.667f
to2.167f
Testing
Tested; works fine as far as I can tell.
Action items
[end]
events)