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
22 lines
638 B
C#
22 lines
638 B
C#
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);
|
|
}
|
|
}
|