This commit is contained in:
Crizomb 2025-01-29 00:59:22 +01:00
parent a17810ffeb
commit 4e91f448c9
826 changed files with 66 additions and 8 deletions

View file

@ -0,0 +1,22 @@
using UnityEngine;
public class OffensiveBehaviour : AbstractBehaviour
{
protected override void MoveAction()
{
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);
}
}