Squashed commit of the following:
commit173bbb165cAuthor: henjkey <henjkey@gmail.com> Date: Fri Aug 14 18:51:23 2026 +0500 Mappp commitd559ab338aAuthor: henjkey <henjkey@gmail.com> Date: Thu Aug 13 18:42:41 2026 +0500 Map Controller Coordinates Target System Crosshair System Radar System
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class AirTarget : MapTarget
|
||||
{
|
||||
protected override void TickMovement(float deltaTime)
|
||||
{
|
||||
if (Player == null || Config == null || Config.MovementSpeed <= 0f)
|
||||
return;
|
||||
|
||||
Vector2 playerCoordinates = Player.MapCoordinates;
|
||||
if (Vector2.Distance(MapCoordinates, playerCoordinates) <= Config.StoppingDistance)
|
||||
return;
|
||||
|
||||
Vector2 nextCoordinates = Vector2.MoveTowards(
|
||||
MapCoordinates,
|
||||
playerCoordinates,
|
||||
Config.MovementSpeed * deltaTime);
|
||||
SetMapCoordinates(nextCoordinates);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user