First project upload
This commit is contained in:
16
Assets/New Lowpoly Models/Scripts/Hurtbox.cs
Normal file
16
Assets/New Lowpoly Models/Scripts/Hurtbox.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Hurtbox : MonoBehaviour
|
||||
{
|
||||
public string bodyPart; // "Head", "Body", "Legs"
|
||||
|
||||
private void Start()
|
||||
{
|
||||
TeamMember parentTeamMember = GetComponentInParent<TeamMember>();
|
||||
|
||||
if (parentTeamMember != null)
|
||||
{
|
||||
gameObject.tag = parentTeamMember.gameObject.tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user