Publisher | Seawisp Hunter, LLC |
---|---|
File size | 347.09kB |
Number of files | 49 |
Latest version | 0.1.1 |
Latest release date | 2023-01-06 11:00:16 |
First release date | 2023-01-06 11:00:16 |
Supported Unity versions | 2018.4.2 or higher |
![screenshot](http://assetstorev1-prd-cdn.unity3d.com/package-screenshot/3415c064-5840-46bc-8dff-689aa433f6c5_scaled.jpg)
![screenshot](http://assetstorev1-prd-cdn.unity3d.com/package-screenshot/1e498ae4-fef7-4e4d-a6c9-5ea43693454d_scaled.jpg)
![screenshot](http://assetstorev1-prd-cdn.unity3d.com/package-screenshot/d48e4459-02b6-4b9f-a66d-ea825a9bc153_scaled.jpg)
![screenshot](http://assetstorev1-prd-cdn.unity3d.com/package-screenshot/c7b0960b-1751-4501-8746-a8ef776e7daa_scaled.jpg)
![screenshot](http://assetstorev1-prd-cdn.unity3d.com/package-screenshot/8c0f95a9-f6e9-47a5-abba-16bc2649272f_scaled.jpg)
![screenshot](http://assetstorev1-prd-cdn.unity3d.com/package-screenshot/e707c9d1-101a-4b46-8014-e1cfe275db4b_scaled.jpg)
There comes a time when many a gamedev sets out for adventure but first must create their own stat class. That is to say a class which captures a game "stat", or "statistic" for lack of a better word, like health, attack, defense, etc. This one is mine. Oh wait! there is a better word: "attribute." But I don't want to take "attribute" from your game, so I'll call mine IModifiableValue<T>. Consider it a sound building block for you to create your own attribute class.
These attributes and their derivatives may affect and be effected by a multitude of transient things, e.g, a sword that bestows an attack advantage; a shield that raises one's defense; a ring that regenerates health. Because of that attributes ought to respect the following requirements:
- An attribute's value shall be altered non-destructively.
- Because so many things may alter an attribute, it shall notify us when changed.
See sample scene here.