parry and health bar pt1
This commit is contained in:
15
Assets/Scripts/HealthBarFollow.cs
Normal file
15
Assets/Scripts/HealthBarFollow.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HealthBarFollow : MonoBehaviour
|
||||
{
|
||||
public Transform target;
|
||||
public Vector3 offset;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (target != null)
|
||||
{
|
||||
transform.position = target.position + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user