C# Класс SafeAndFree.Helpers.Calculator

Generic match helper methods.
Показать файл Открыть проект

Открытые методы

Метод Описание
BestShootableCreep ( List targets, Vector2 towerPosition, int range, Creep &creep ) : bool

Not yet the best shootable creep, right now just any creep returns true if there's a valid creep, creep is the target

GetDistance ( Vector2 pos1, Vector2 pos2 ) : double

Get the distance between two points.

MovementTowardsPoint ( Vector2 start, Vector2 end, int speed, bool &Connected ) : Vector2

Gives the movement vector for an object to move towards the given point.

ToDegrees ( float radians ) : float
ToRadians ( float degrees ) : float

Описание методов

BestShootableCreep() публичный статический Метод

Not yet the best shootable creep, right now just any creep returns true if there's a valid creep, creep is the target
public static BestShootableCreep ( List targets, Vector2 towerPosition, int range, Creep &creep ) : bool
targets List
towerPosition Vector2
range int
creep Creep
Результат bool

GetDistance() публичный статический Метод

Get the distance between two points.
public static GetDistance ( Vector2 pos1, Vector2 pos2 ) : double
pos1 Vector2 The first point.
pos2 Vector2 The second point.
Результат double

MovementTowardsPoint() публичный статический Метод

Gives the movement vector for an object to move towards the given point.
public static MovementTowardsPoint ( Vector2 start, Vector2 end, int speed, bool &Connected ) : Vector2
start Vector2 The position to move from.
end Vector2 The position to move to.
speed int The vector's magnitude.
Connected bool True if the vector
Результат Vector2

ToDegrees() публичный статический Метод

public static ToDegrees ( float radians ) : float
radians float
Результат float

ToRadians() публичный статический Метод

public static ToRadians ( float degrees ) : float
degrees float
Результат float