Beeg checkin
This commit is contained in:
14
Enemies/Scripts/GodCircuit.cs
Normal file
14
Enemies/Scripts/GodCircuit.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Godot;
|
||||
|
||||
public partial class GodCircuit : Node3D
|
||||
{
|
||||
private void OnHit(Node3D node)
|
||||
{
|
||||
GD.Print("Hit");
|
||||
var hpComponent = GetNode<HealthPoints>("HP Component");
|
||||
hpComponent.TakeDamage(800000);
|
||||
hpComponent.UpdateHealthbar();
|
||||
if (hpComponent.CurrentHP <= 0)
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user