C# Class Aura.Channel.World.Position

Describes the current position of an entity.
Afficher le fichier Open project: aura-project/aura Class Usage Examples

Méthodes publiques

Свойство Type Description
X int
Y int

Méthodes publiques

Méthode Description
Equals ( object obj ) : bool
GetDirection ( Position otherPos ) : float

Returns direction the other position is in as radian.

GetDistance ( Position otherPos ) : int

Returns distance between this and another position.

GetHashCode ( ) : int
GetRandomInRange ( int radius, Random rnd ) : Position

Returns random position in radius around this position.

GetRandomInRange ( int distanceMin, int distanceMax, Random rnd ) : Position

Returns random position around this position, not nearer than min, and not further than max.

GetRandomInRect ( int width, int height, Random rnd ) : Position

Returns random position in rect, centered on this position.

GetRelative ( Position other, int distance ) : Position

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 ) : Position

Returns position in direction and distance.

InCone ( Position tip, double direction, int radius, double angle ) : bool

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 ( Position otherPos, int range ) : bool

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 pos ) : System
Position ( int x, int y ) : System
Position ( long locationId ) : System

New Position based on location id (i.e. 0x3000RRRRXXXXYYYY).

ToString ( ) : string
operator ( ) : bool

Private Methods

Méthode Description
GetRandom ( int distance, Random rnd ) : Position

Returns random position in radius around this position.

Method Details

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

GetDirection() public méthode

Returns direction the other position is in as radian.
public GetDirection ( Position otherPos ) : float
otherPos Position
Résultat float

GetDistance() public méthode

Returns distance between this and another position.
public GetDistance ( Position otherPos ) : int
otherPos Position
Résultat int

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetRandomInRange() public méthode

Returns random position in radius around this position.
public GetRandomInRange ( int radius, Random rnd ) : Position
radius int
rnd System.Random
Résultat Position

GetRandomInRange() public méthode

Returns random position around this position, not nearer than min, and not further than max.
public GetRandomInRange ( int distanceMin, int distanceMax, Random rnd ) : Position
distanceMin int
distanceMax int
rnd System.Random
Résultat Position

GetRandomInRect() public méthode

Returns random position in rect, centered on this position.
public GetRandomInRect ( int width, int height, Random rnd ) : Position
width int
height int
rnd System.Random
Résultat Position

GetRelative() public méthode

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.
public GetRelative ( Position other, int distance ) : Position
other Position
distance int
Résultat Position

GetRelative() public méthode

Returns position in direction and distance.
public GetRelative ( double radian, int distance ) : Position
radian double
distance int
Résultat Position

InCone() public méthode

Returns true if this position is in a cone, based on the parameters.
public InCone ( Position tip, double direction, int radius, double angle ) : bool
tip Position Tip of the cone.
direction double Cone's direction as radian.
radius int Cone's radius.
angle double Cone's angle as radian.
Résultat bool

InPolygon() public méthode

Returns whether the position is inside the given points.
public InPolygon ( ) : bool
Résultat bool

InRange() public méthode

Returns true if the other position is within range.
public InRange ( Position otherPos, int range ) : bool
otherPos Position
range int
Résultat bool

InRange() public méthode

Returns true if the other position is within range.
public InRange ( int x, int y, int range ) : bool
x int
y int
range int
Résultat bool

Position() public méthode

public Position ( Position pos ) : System
pos Position
Résultat System

Position() public méthode

public Position ( int x, int y ) : System
x int
y int
Résultat System

Position() public méthode

New Position based on location id (i.e. 0x3000RRRRXXXXYYYY).
public Position ( long locationId ) : System
locationId long
Résultat System

ToString() public méthode

public ToString ( ) : string
Résultat string

operator() public static méthode

public static operator ( ) : bool
Résultat bool

Property Details

X public_oe property

public int X
Résultat int

Y public_oe property

public int Y
Résultat int