C# Class Danmaku_no_Kyojin.Collisions.CollisionConvexPolygon

Inheritance: CollisionElement
显示文件 Open project: Noxalus/Danmaku-no-Kyojin Class Usage Examples

Public Methods

Method Description
CollisionConvexPolygon ( Entity parent, Vector2 relativePosition, List vertices, float healthPoint = 100 ) : System
Draw ( SpriteBatch sp ) : void
GetCenter ( ) : Vector2
GetCenterInWorldSpace ( ) : Vector2
GetLocalPosition ( ) : Vector2
GetSize ( ) : Vector2
GetWorldPosition ( ) : Vector2
Intersects ( CollisionElement collisionElement ) : bool

Private Methods

Method Description
ComputeAxes ( ) : void
ComputeCenter ( ) : void
ComputeLocalPosition ( ) : void
ComputeSize ( ) : void
GetAxes ( ) : List
GetWorldPosition ( Vector2 vertex ) : Vector2
Intersects ( CollisionCircle circle ) : bool
Intersects ( CollisionConvexPolygon element ) : bool
Overlap ( Vector2 p1, Vector2 p2 ) : bool
Project ( Vector2 axis ) : Vector2

Method Details

CollisionConvexPolygon() public method

public CollisionConvexPolygon ( Entity parent, Vector2 relativePosition, List vertices, float healthPoint = 100 ) : System
parent Entity
relativePosition Vector2
vertices List
healthPoint float
return System

Draw() public method

public Draw ( SpriteBatch sp ) : void
sp Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

GetCenter() public method

public GetCenter ( ) : Vector2
return Vector2

GetCenterInWorldSpace() public method

public GetCenterInWorldSpace ( ) : Vector2
return Vector2

GetLocalPosition() public method

public GetLocalPosition ( ) : Vector2
return Vector2

GetSize() public method

public GetSize ( ) : Vector2
return Vector2

GetWorldPosition() public method

public GetWorldPosition ( ) : Vector2
return Vector2

Intersects() public method

public Intersects ( CollisionElement collisionElement ) : bool
collisionElement CollisionElement
return bool