Publisher | flipe-ms-rodrigues |
---|---|
File size | 223.20kB |
Number of files | 26 |
Latest version | 1.2.0 |
Latest release date | 2023-03-22 09:59:34 |
First release date | 2022-02-22 08:42:12 |
Supported Unity versions | 2018.4.2 or higher |
Simple to use yet customizable & extensible resource / status bar system designed with MOBA/RPG/MMORPG-like games in mind, but nonetheless suitable for most any game wherein displaying finite capped resources (e.g., health, mana, etc.) or progress towards a delayed event (e.g., accumulating experience until leveling up, casting a spell, etc.) is required.
NOTE: Although this is technically not a standalone package, its only asset store dependency - Minimalist Quantity System - is free:)
Features:
- a clean though highly customizable Bar System for displaying finite capped Quantities as Bars, using nothing but Unity UI (no sprites, textures nor custom shaders);
- a custom Bar Canvas that allows for flexible switching between displaying Bars as static HUD or as spatial World elements anchored to a target Transform (e.g., the Player's, an enemy's, etc.) and facing the specified Camera;
- an extensible Unity Event-/Action-based Quantity Subsystem for managing and broadcasting resource / progress changes to any and all subscribers (e.g., Bars);
- option for parameterizable accumulating or depleting Passive Dynamics on each Quantity (e.g., health regeneration, fury decay, gradual progress, etc.);
- configurable fill amount increment, decrement & flash Animations that rely on Coroutines at runtime and EditorCoroutines in edit mode (in order to facilitate tweaking animation parameters);
- option to make each Bar's fill color depend on the fill amount of the Quantity it subscribes to using color Gradients;
- optional quantity Labels (e.g., "HP: 75/100");
- a Bar and a Quantity prefab for ease of setup, as well as 5 Quantity presets (Health, Mana, Fury, Experience, Cast) to get you started;
Upcoming:
- floating PopUp text (e.g., damage, heal, etc.);
- UI Preview element to indicate incoming changes (e.g., casting a heal will cause both the health bar's preview element and the mana bar's preview elements to reflect the heal that is inbound and its cost, respectively);
- Tooltip System for displaying quantity info on mouse hover;
- suggestions are welcome:)
Sample scene:
In order to demo how to map each bar to the in-game quantity it represents, the package includes a Sample Scene with a controllable player character (with health, mana, fury, cast and experience quantities and HUD as well as world bars), three allies and one enemy (all of which with health quantities and world bars). In this scene, hail falls from the sky continuously, and each hit causes a fixed decrement to the hit character's health bar. Health and mana bars continuously regenerate by a fixed percentual amount per second. Fury decays passively, and increases by a fixed amount each time the player is hit by a hail particle, and acts as a movement speed modifier (the more of it the player has, the faster the player moves). Pressing the space bar will make the player start casting a healing spell (contingent on the player having enough mana to do it, otherwise the mana bar flashes) that once finished, heals all nearby allies by a fixed amount (pressing the space bar again before the casting has finished will make the cast bar flash to signal that that can't be done just yet). If already at full health, health bars flash to signal just that. Additionaly, each successful heal leads to an experience gain. Once the experience bar is full, the player "levels up" and its health pool increases. Note that the scripts used in this sample scene are not the central focus of this package, and as such were not designed nor written with the same care as those controlling the main functionalities of the package.
Cheers,
Flipe