cringe bug fix im stupid

in HealthHandmer
This commit is contained in:
Crizomb 2025-01-28 11:58:43 +01:00
parent 37bed1fd33
commit f5acd70d85
11 changed files with 135 additions and 53 deletions

View file

@ -4,11 +4,19 @@ public class OffensiveBehaviour : AbstractBehaviour
{
protected override void MoveAction()
{
throw new System.NotImplementedException();
}
protected override void AttackAction()
{
throw new System.NotImplementedException();
if (CurrentMinecraftUnit.IsTeamA)
{
if (GlobalsVariable.QueenB == null) return;
}
else
{
if (GlobalsVariable.QueenA == null) return;
}
CurrentMinecraftUnit.MovementHandler.TargetUnit = GlobalsVariable.QueenB;
Vector3 targetPos = CurrentMinecraftUnit.MovementHandler.TargetUnit.transform.position;
Vector3 goalPos = targetPos + (transform.position - targetPos).normalized * distanceGoal;
CurrentMinecraftUnit.MovementHandler.MoveTowards(goalPos);
}
}