Files
hotdesking/Gameplay/Effects/Spiky.cs

21 lines
420 B
C#

using Godot;
using System;
public partial class Spiky : Effect
{
public Spiky(Node2D OWNER) : base(OWNER)
{
_trigger.Add(Trigger.Collision);
}
public override void TriggerEffect(Node TARGET = null)
{
if (TARGET is Worker)
{
Worker target = (Worker)TARGET;
target._rotationalForce += 10;
target.ChangeHealth(-1, _owner);
}
}
}