Skip to content

Instantly share code, notes, and snippets.

View TheMehranKhan's full-sized avatar

Mehran TheMehranKhan

View GitHub Profile
@TheMehranKhan
TheMehranKhan / HealthBar.cs
Created October 27, 2023 20:34
A health bar that is represented by a slider UI element.
// Author: themehrankhan
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// A health bar that is represented by a slider UI element.
/// It can be used to display the player's current health in the game.
///
/// To use the health bar, simply attach this script to a game object in your scene