Property | Type | Description | |
---|---|---|---|
ActionState | ActionState | ||
AttackDamage | int | ||
Direction | float | ||
Height | int | ||
Hp | |||
OwnerId | string | ||
Speed | float |
Property | Type | Description | |
---|---|---|---|
MaskH | int | ||
MaskW | int |
Method | Description | |
---|---|---|
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 |
Method | Description | |
---|---|---|
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 |
Method | Description | |
---|---|---|
AppendState ( EntityState es ) : void |
public static AngleBetweenPoints ( CCPoint p1, CCPoint p2 ) : float | ||
p1 | CCPoint | |
p2 | CCPoint | |
return | float |
public Collision ( Entity other ) : void | ||
other | Entity | Объект с которым произошло столкновение |
return | void |
public static DistanceBetweenPoints ( CCPoint p1, CCPoint p2 ) : float | ||
p1 | CCPoint | |
p2 | CCPoint | |
return | float |
public Entity ( string url, string id ) : System | ||
url | string | |
id | string | |
return | System |
public static GetNormalPointByDirection ( float dir ) : CCPoint | ||
dir | float | |
return | CCPoint |
protected MoveByAngle ( float angle, float speed ) : void | ||
angle | float | |
speed | float | |
return | void |
protected MoveFromTarget ( CCPoint target, float speed ) : void | ||
target | CCPoint | |
speed | float | |
return | void |
protected MoveToTarget ( CCPoint target, float speed ) : void | ||
target | CCPoint | |
speed | float | |
return | void |
public static ToRadians ( float angle ) : float | ||
angle | float | |
return | float |