Boss Hurts PLayer
This commit is contained in:
29
Assets/Scripts/LungeHitbox.cs
Normal file
29
Assets/Scripts/LungeHitbox.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class LungeHitbox : 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.5f;
|
||||
}
|
||||
else{
|
||||
Debug.Log("Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user