-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 WithSwitchableOverlay for Firestrom Generator #21413
Conversation
dnqbob
commented
May 1, 2024
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.
Overall LGTM, just a few naming nits
11765e1
to
36444da
Compare
else if (!string.IsNullOrEmpty(Info.DisabledSequence)) | ||
overlay.PlayRepeating(RenderSprites.NormalizeSequence(overlay, self.GetDamageState(), Info.DisabledSequence)); | ||
else if (!string.IsNullOrEmpty(Info.SwitchingSequence)) | ||
overlay.PlayRepeating(RenderSprites.NormalizeSequence(overlay, self.GetDamageState(), Info.SwitchingSequence)); |
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.
I'm just wondering. Does this pattern exist anywhere else? It feels a bit wrong for it to not be handling conditions. Perhaps it should be handled in INotifyCreated?
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.
Nah, it just because if there is no sequence being played, AnimationWithOffset
will crash:
var anim = new AnimationWithOffset(overlay, ...);
The lines here try to find out a valid sequence, or any valid sequence to fill the blank since you must allow a null value for all sequences.
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.
That is the same even you move it to "INotifyCreated", and it is not related to conditions.
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.
LGTM