![]() |
FCV Engine 0.1
A tool and framework for tutorials in game development
|
Manages the UI representation of weapon slots, including adding new slots, setting images, and handling weapon changes. More...
Public Member Functions | |
void | AddWeaponSlot (Weapon weapon, int key) |
Adds and sets up a weapon slot UI for the provided weapon. | |
void | WeaponChanged (int index) |
Activates the border of the weapon slot at the given index and deactivates all other borders. | |
Private Member Functions | |
void | SetupEventsAutomatically () |
Sets up events for weapon actions from the WeaponController. | |
bool | MethodSubscribed ([NotNull] UnityEventBase @event, string methodName) |
Checks if a Unity Event has a specific method subscribed. | |
Manages the UI representation of weapon slots, including adding new slots, setting images, and handling weapon changes.
Definition at line 12 of file WeaponUI.cs.
void AddWeaponSlot | ( | Weapon | weapon, |
int | key ) |
Adds and sets up a weapon slot UI for the provided weapon.
weapon | Weapon to be added to UI. |
key | The key used to equip the weapon when changing weapons. |
Definition at line 69 of file WeaponUI.cs.
|
private |
Checks if a Unity Event has a specific method subscribed.
event | The Unity event to check for a subscribed method. |
methodName | The name of the method to look for in the event's subscribers. |
Definition at line 52 of file WeaponUI.cs.
void WeaponChanged | ( | int | index | ) |
Activates the border of the weapon slot at the given index and deactivates all other borders.
index | Index of the weapon slot to activate. |
Definition at line 93 of file WeaponUI.cs.