Created
March 17, 2015 11:59
-
-
Save s2kw/4fa0d2debae7017faaec to your computer and use it in GitHub Desktop.
memo for angry ability fact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float GetFact( float ownersHp ){ | |
| var skillFactValue = 3f; // 適当 | |
| var ownersMaxHp = 1000f; // 適当 | |
| ownersHp = ownersMaxHp < ownersHp ? ownersMaxHp : ownersHp; | |
| float currentDamage = ownersMaxHp - ownersHp; | |
| var rate = currentDamage / ( ownersMaxHp - ( ownersMaxHp * 0.1f ) ); | |
| rate = rate > 1f ? 1f : rate; | |
| return Mathf.Lerp(1f, skillFactValue, rate ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment