Skip to content
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

stagger: Move colour update to its own function #359

Merged
merged 5 commits into from
May 13, 2017
Merged

Conversation

ls-
Copy link
Member

@ls- ls- commented May 10, 2017

No description provided.

@ls- ls- changed the title stagger: Move colour update to its own function. stagger: Move colour update to its own function May 10, 2017
element:SetMinMaxValues(0, max)
element:SetValue(cur)

--[[ Override: Stagger:UpdateColor(unit, perc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit is unused

Copy link
Member Author

@ls- ls- May 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, forgot to remove it 😁🔫

element:SetValue(cur)

--[[ Override: Stagger:UpdateColor(unit, perc)
Used to completely override the internal function for updating the widgets' colors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

widget's instead of widgets' - we only have one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copypaste typo o_O
Copied it from health element, it says widgets' there...

Used to completely override the internal function for updating the widgets' colors.

* self - the Stagger element
* perc - the percentage of staggered damage (number)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add that it is relative to the player's maximum health.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe add value range

Copy link
Member Author

@ls- ls- May 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why though? It can't be relative to anything else, and it's a percentage, it's 0-1, always...

Copy link
Contributor

@Rainrider Rainrider May 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be relative to what matters to whoever overrides UpdateColor. Also not all ppl think of percentages as values between 0-1. Actually perc is only used by UpdateColor, why not pass stagger and max health to it and calc perc in UpdateColor?

@ls- ls- merged commit fa35b33 into development May 13, 2017
@ls- ls- deleted the patch-stagger branch May 13, 2017 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants