private void Start() { hpBar = UIManager.main.GetHitPointBar(health); agent = GetComponent <NavMeshAgent>(); agentSpeed = agent.speed; pool = GetComponent <Pooled>().GetPool(); Initialize(); }
public override void Render() { if (ShowHitbar) { HitPointBar.Render(); } base.Render(); }
public HitPointBar GetHitPointBar(float hp) { HitPointBar hpBar = Prefabs.Instantiate <HitPointBar>(); hpBar.Initialize(hp); hpBar.transform.SetParent(worldSpaceCanvas); return(hpBar); }
void Start() { hitPointBar = UIManager.main.GetHitPointBar(hp); Vector3 hpBarPos = transform.position; hpBarPos.y = 4f; hitPointBar.SetSize(new Vector2(200, 20)); hitPointBar.UpdatePosition(hpBarPos); }
public void SetHitpoint(double value) { double factor = 100 / MaxStrength; HitPointBar.SetHitpoint(100 - ((factor * value) - 100)); }
public void AdjustHitBar(double value) { double val = Strength % 100; HitPointBar.HitpointSubtract(value); }