C# 클래스 Aura.Channel.World.Position

Describes the current position of an entity.
파일 보기 프로젝트 열기: aura-project/aura 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
X int
Y int

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
GetRandom ( int distance, Random rnd ) : Position

Returns random position in radius around this position.

메소드 상세

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

GetDirection() 공개 메소드

Returns direction the other position is in as radian.
public GetDirection ( Position otherPos ) : float
otherPos Position
리턴 float

GetDistance() 공개 메소드

Returns distance between this and another position.
public GetDistance ( Position otherPos ) : int
otherPos Position
리턴 int

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

GetRandomInRange() 공개 메소드

Returns random position in radius around this position.
public GetRandomInRange ( int radius, Random rnd ) : Position
radius int
rnd System.Random
리턴 Position

GetRandomInRange() 공개 메소드

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
리턴 Position

GetRandomInRect() 공개 메소드

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
리턴 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.
public GetRelative ( Position other, int distance ) : Position
other Position
distance int
리턴 Position

GetRelative() 공개 메소드

Returns position in direction and distance.
public GetRelative ( double radian, int distance ) : Position
radian double
distance int
리턴 Position

InCone() 공개 메소드

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.
리턴 bool

InPolygon() 공개 메소드

Returns whether the position is inside the given points.
public InPolygon ( ) : bool
리턴 bool

InRange() 공개 메소드

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

InRange() 공개 메소드

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

Position() 공개 메소드

public Position ( Position pos ) : System
pos Position
리턴 System

Position() 공개 메소드

public Position ( int x, int y ) : System
x int
y int
리턴 System

Position() 공개 메소드

New Position based on location id (i.e. 0x3000RRRRXXXXYYYY).
public Position ( long locationId ) : System
locationId long
리턴 System

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

operator() 공개 정적인 메소드

public static operator ( ) : bool
리턴 bool

프로퍼티 상세

X 공개적으로 프로퍼티

public int X
리턴 int

Y 공개적으로 프로퍼티

public int Y
리턴 int