namklabs / game-stat Goto Github PK
View Code? Open in Web Editor NEWA JavaScript class that handles numeric stats for your video game entity. Need to keep track of Hit Points? Energy? Ammo? This class will let you easily modify your stats while enforcing rules to keep the numeric values in check. Execute function hooks when values meet criteria. Round and increment values by the scale you specify.
License: MIT License