User interface - Adding functionalities
![Immagine](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JdA1R82_bGarczmaufuZEvTNmCQomDW697K_tzTbSNR3KGp0_Ihm_SkjmiNki1dii3HDXavAygneiFXQT1YIDscsnngbuDyf4M3MGEPE1DHhCGNCdbRUWy2n_4d-22TsRbqSzaB1esn0/s1600/117.jpg)
In the previous post we created the layout for our user interface. Before going on with the work on it, I want to add some useful stuff to C++ code. I decided to store all informations about the player status (health points, resources, etc.) in the PlayerController class, becuse it seems the most logic place for them. So I'm adding a bunch of new variables: lives: the number of actual health points left; maxLives: the maximum number of available health points (it's 3 for now); resources: the number of collected resources; maxResources: the maximum number of collectible resources (let's say it's our cargo space, and I'm setting it to 5 for now). All these variables are created with the UPROPERTY macro, so that they're visible from the Blueprints, and can be used to modify the User Interface widget. I'm also going to create some new UFUNCTION methods that will handle the events coming from the User Interface buttons: selectOpti...