프로퍼티 | 타입 | 설명 | |
---|---|---|---|
ActionState | ActionState | ||
AttackDamage | int | ||
Direction | float | ||
Height | int | ||
Hp | |||
OwnerId | string | ||
Speed | float |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
MaskH | int | ||
MaskW | int |
메소드 | 설명 | |
---|---|---|
AngleBetweenPoints ( CCPoint p1, CCPoint p2 ) : float | ||
AngleTo ( CCPoint p ) : float | ||
Collision ( Entity other ) : void |
Метод вызывается при столкновении двух объектов.
|
|
DistanceBetweenPoints ( CCPoint p1, CCPoint p2 ) : float | ||
DistanceTo ( CCPoint p ) : float | ||
DistanceTo ( Entity ent ) : float | ||
Entity ( string url, string id ) : System | ||
GetNormalPointByDirection ( float dir ) : CCPoint | ||
GetOwner ( ) : Entity | ||
OnClient ( ) : bool | ||
OnServer ( ) : bool | ||
Remove ( bool cleanup = true ) : void |
Удаляет объект со сцены у своего родителя
|
|
ToRadians ( float angle ) : float | ||
Update ( float dt ) : void |
메소드 | 설명 | |
---|---|---|
AddedToScene ( ) : void | ||
MoveByAngle ( float angle, float speed ) : void | ||
MoveFromTarget ( CCPoint target, float speed ) : void | ||
MoveToTarget ( CCPoint target, float speed ) : void | ||
PredictMove ( ) : void |
Пытается предугадать движение Вызывается на клиенте для сглаживания движения TODO: не работает
|
|
UpdateMask ( ) : void |
메소드 | 설명 | |
---|---|---|
AppendState ( EntityState es ) : void |
public static AngleBetweenPoints ( CCPoint p1, CCPoint p2 ) : float | ||
p1 | CCPoint | |
p2 | CCPoint | |
리턴 | float |
public Collision ( Entity other ) : void | ||
other | Entity | Объект с которым произошло столкновение |
리턴 | void |
public static DistanceBetweenPoints ( CCPoint p1, CCPoint p2 ) : float | ||
p1 | CCPoint | |
p2 | CCPoint | |
리턴 | float |
public static GetNormalPointByDirection ( float dir ) : CCPoint | ||
dir | float | |
리턴 | CCPoint |
protected MoveByAngle ( float angle, float speed ) : void | ||
angle | float | |
speed | float | |
리턴 | void |
protected MoveFromTarget ( CCPoint target, float speed ) : void | ||
target | CCPoint | |
speed | float | |
리턴 | void |
protected MoveToTarget ( CCPoint target, float speed ) : void | ||
target | CCPoint | |
speed | float | |
리턴 | void |