cringe bug fix im stupid
in HealthHandmer
This commit is contained in:
parent
37bed1fd33
commit
f5acd70d85
11 changed files with 135 additions and 53 deletions
|
@ -4,11 +4,20 @@ public class DefensiveBehaviour : AbstractBehaviour
|
|||
{
|
||||
protected override void MoveAction()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
if (CurrentMinecraftUnit.IsTeamA)
|
||||
{
|
||||
if (GlobalsVariable.AliveUnitsTeamB.Count == 0) return;
|
||||
CurrentMinecraftUnit.MovementHandler.UpdateNearestFrom(GlobalsVariable.QueenA.transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GlobalsVariable.AliveUnitsTeamA.Count == 0) return;
|
||||
CurrentMinecraftUnit.MovementHandler.UpdateNearestFrom(GlobalsVariable.QueenB.transform);
|
||||
}
|
||||
|
||||
Vector3 targetPos = CurrentMinecraftUnit.MovementHandler.TargetUnit.transform.position;
|
||||
Vector3 goalPos = targetPos + (transform.position - targetPos).normalized * distanceGoal;
|
||||
CurrentMinecraftUnit.MovementHandler.MoveTowards(goalPos);
|
||||
}
|
||||
|
||||
protected override void AttackAction()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue