hello everyone i have PlayerStats.js i tried to find add healthbar but i found always .cs type can someone help me how can i add healthbar it basicly i know creating canvas and healthbar, background images this is my script
#pragma strict
var MaxHealth = 100;
var Health : int;
function Start ()
{
Health = MaxHealth;
}
function ApplyDamage (TheDamage : int)
{
if(Health >= 0)
{
Health -= TheDamage;
}
if(Health <= 0)
{
Dead();
}
}
function Dead()
{
RespawnMenuV2.playerIsDead = true;
Debug.Log("Player Died");
}
function RespawnStats ()
{
Health = MaxHealth;
}
↧