Property | Type | Description | |
---|---|---|---|
X | int | ||
Y | int |
Method | Description | |
---|---|---|
Equals ( object obj ) : bool | ||
GetDirection ( |
Returns direction the other position is in as radian.
|
|
GetDistance ( |
Returns distance between this and another position.
|
|
GetHashCode ( ) : int | ||
GetRandomInRange ( int radius, |
Returns random position in radius around this position.
|
|
GetRandomInRange ( int distanceMin, int distanceMax, |
Returns random position around this position, not nearer than min, and not further than max.
|
|
GetRandomInRect ( int width, int height, |
Returns random position in rect, centered on this position.
|
|
GetRelative ( |
Returns position on the line between position and other. When you knock someone back, he gets pushed in the opposite direction. The other position would be the enemy, the distance the amount how far to push him away. A negative distance will return a position between you two. |
|
GetRelative ( double radian, int distance ) : |
Returns position in direction and distance.
|
|
InCone ( |
Returns true if this position is in a cone, based on the parameters.
|
|
InPolygon ( ) : bool |
Returns whether the position is inside the given points.
|
|
InRange ( |
Returns true if the other position is within range.
|
|
InRange ( int x, int y, int range ) : bool |
Returns true if the other position is within range.
|
|
Position ( |
||
Position ( int x, int y ) : System | ||
Position ( long locationId ) : System |
New Position based on location id (i.e. 0x3000RRRRXXXXYYYY).
|
|
ToString ( ) : string | ||
operator ( ) : bool |
Method | Description | |
---|---|---|
GetRandom ( int distance, |
Returns random position in radius around this position.
|
public GetDirection ( |
||
otherPos | ||
return | float |
public GetDistance ( |
||
otherPos | ||
return | int |
public GetRandomInRange ( int radius, |
||
radius | int | |
rnd | ||
return |
public GetRandomInRange ( int distanceMin, int distanceMax, |
||
distanceMin | int | |
distanceMax | int | |
rnd | ||
return |
public GetRandomInRect ( int width, int height, |
||
width | int | |
height | int | |
rnd | ||
return |
public GetRelative ( |
||
other | ||
distance | int | |
return |
public GetRelative ( double radian, int distance ) : |
||
radian | double | |
distance | int | |
return |
public InCone ( |
||
tip | Tip of the cone. | |
direction | double | Cone's direction as radian. |
radius | int | Cone's radius. |
angle | double | Cone's angle as radian. |
return | bool |
public InRange ( |
||
otherPos | ||
range | int | |
return | bool |
public InRange ( int x, int y, int range ) : bool | ||
x | int | |
y | int | |
range | int | |
return | bool |