Boss Hurts PLayer

This commit is contained in:
Garrett Kaiser
2026-01-15 14:54:58 -08:00
parent 3d0dbd029a
commit ef830fd4ac
6 changed files with 85 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
using UnityEngine;
public class JumpHitbox : MonoBehaviour
{
public PlayerMovement playerMovement;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("Hit Player");
playerMovement.HP -= 1;
}
else{
Debug.Log("Failed");
}
}
}