C# Class EssenceShared.Entities.Entity

Базовый класс для всех игровых объектов
Inheritance: CocosSharp.CCSprite
Datei anzeigen Open project: Insality/essence-of-shadows Class Usage Examples

Public Properties

Property Type Description
ActionState ActionState
AttackDamage int
Direction float
Height int
Hp EssenceShared.Game.Stat
OwnerId string
Speed float

Protected Properties

Property Type Description
MaskH int
MaskW int

Public Methods

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

Protected Methods

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

Private Methods

Method Description
AppendState ( EntityState es ) : void

Method Details

AddedToScene() protected method

protected AddedToScene ( ) : void
return void

AngleBetweenPoints() public static method

public static AngleBetweenPoints ( CCPoint p1, CCPoint p2 ) : float
p1 CCPoint
p2 CCPoint
return float

AngleTo() public method

public AngleTo ( CCPoint p ) : float
p CCPoint
return float

Collision() public method

Метод вызывается при столкновении двух объектов.
public Collision ( Entity other ) : void
other Entity Объект с которым произошло столкновение
return void

DistanceBetweenPoints() public static method

public static DistanceBetweenPoints ( CCPoint p1, CCPoint p2 ) : float
p1 CCPoint
p2 CCPoint
return float

DistanceTo() public method

public DistanceTo ( CCPoint p ) : float
p CCPoint
return float

DistanceTo() public method

public DistanceTo ( Entity ent ) : float
ent Entity
return float

Entity() public method

public Entity ( string url, string id ) : System
url string
id string
return System

GetNormalPointByDirection() public static method

public static GetNormalPointByDirection ( float dir ) : CCPoint
dir float
return CCPoint

GetOwner() public method

public GetOwner ( ) : Entity
return Entity

MoveByAngle() protected method

protected MoveByAngle ( float angle, float speed ) : void
angle float
speed float
return void

MoveFromTarget() protected method

protected MoveFromTarget ( CCPoint target, float speed ) : void
target CCPoint
speed float
return void

MoveToTarget() protected method

protected MoveToTarget ( CCPoint target, float speed ) : void
target CCPoint
speed float
return void

OnClient() public method

public OnClient ( ) : bool
return bool

OnServer() public method

public OnServer ( ) : bool
return bool

PredictMove() protected method

Пытается предугадать движение Вызывается на клиенте для сглаживания движения TODO: не работает
protected PredictMove ( ) : void
return void

Remove() public method

Удаляет объект со сцены у своего родителя
public Remove ( bool cleanup = true ) : void
cleanup bool
return void

ToRadians() public static method

public static ToRadians ( float angle ) : float
angle float
return float

Update() public method

public Update ( float dt ) : void
dt float
return void

UpdateMask() protected method

protected UpdateMask ( ) : void
return void

Property Details

ActionState public_oe property

public ActionState ActionState
return ActionState

AttackDamage public_oe property

public int AttackDamage
return int

Direction public_oe property

public float Direction
return float

Height public_oe property

public int Height
return int

Hp public_oe property

public Stat,EssenceShared.Game Hp
return EssenceShared.Game.Stat

MaskH protected_oe property

protected int MaskH
return int

MaskW protected_oe property

protected int MaskW
return int

OwnerId public_oe property

public string OwnerId
return string

Speed public_oe property

public float Speed
return float