Wednesday, 20 August 2025 02:02:40

This commit is contained in:
2025-08-20 02:02:42 -04:00
parent dfbad40739
commit 2eb95b18fd
32 changed files with 242 additions and 167 deletions

View File

@@ -0,0 +1,26 @@
using Godot;
using System;
public partial class Caffeinate : Action
{
public Caffeinate(Node2D OWNER) : base(OWNER)
{
_triggers.Add(Trigger.On.Collision);
}
public override void Fire()
{
if (_target != null)
{
if (_target is Worker)
{
Worker target = (Worker)_target;
target._rotationalForce += 10;
Vector2 targetDistanceNormal = (target.Position - _owner.Position).Normalized();
target.ApplyCentralForce(targetDistanceNormal * 10);
target.ChangeHealth(-1, _owner);
}
_target = null;
}
}
}