REGENERATING ENERGY BAR IN UNITY 🎮 | Energy System Unity Tutorial | Learn Unity For Free
Creating a Stamina system in Unity can be tricky for some people. In this tutorial you will learn how to create a easy player stamina system that anyone can follow! 🙂 This system will be re-usable, meaning you can use it to add stamina to ANY unit inside your game, including enemies, friendly NPCs, etc...
This video will be based on the Health Bar tutorials I created prior to this video, so you will need to follow along on these first, before continuing watching this video. 🙂
#1 Health system: https://www.youtube.com/watch?v=9i0UGVUKiaE&ab_channel=DaniKrossing
#2 Health bar: https://www.youtube.com/watch?v=FBDN4b9PGgE&ab_channel=DaniKrossing
Time.deltaTime explained: https://www.youtube.com/watch?v=8pYq15Lh0x4&ab_channel=DaniKrossing
➤ TIMESTAMPS
00:00:00 - Introduction
00:00:41 - I have a confession...
00:01:33 - Setting up out UI Canvas
00:04:06 - Creating our UnitStamina script
00:14:37 - Creating our Staminabar script
00:17:06 - Instantiating our UnitStamina class
00:18:58 - Changing our PlayerBehaviour script
00:26:57 - Changing our Players sprint speed
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon and YouTube Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Memberships: https://www.youtube.com/channel/UCzyuZJ8zZ-Lhfnz41DG5qLw/join
Patreon: https://www.patreon.com/mmtuts