C# 클래스 MegaMan.Engine.CollisionComponent

상속: MegaMan.Engine.Component
파일 보기 프로젝트 열기: Tesserex/C--MegaMan-Engine 1 사용 예제들

공개 메소드들

메소드 설명
AddBox ( MegaMan.Engine.CollisionBox box ) : void
CheckIfOneEntityHitContainProperty ( string property ) : bool

Function to check collision with solid objects which occured during game tick.

CheckIfOneEntityHitContainProperty_RealTime ( string property ) : bool

Function to check RealTime collision with solid objects. (not in game loop). CollisionWithAllEntities_RealTime Must have been called before.

CheckIfOneTileHitContainProperty ( string property ) : bool

Function to check collisions with tiles that occured during tick.

CheckIfOneTileHitContainProperty_RealTime ( string property ) : bool

Function to check RealTime collision (not in game loop). CollisionWithTiles_RealTime Must have been called before.

Clone ( ) : MegaMan.Engine.Component
CollisionWithAllEntitiesAndTiles_RealTime ( string boxName, string entity, string property, bool pushAway, bool solidOnly, bool checkTilesForCollisions, bool checkEntitiesForCollisions ) : bool

Function that checks collision with tiles and/or entities. Stops the checks as soon as one collision is found

IF MANY ENTITIES, ONLY FIRST ON IN LIST IS CHECKED

Message ( IGameMessage msg ) : void
RegisterDependencies ( MegaMan.Engine.Component component ) : void
Start ( IGameplayContainer container ) : void
Stop ( IGameplayContainer container ) : void
TouchedAt ( string myGroup, string targetGroup = null ) : bool
TouchedBy ( string group ) : bool
VerticalApproach ( RectangleF intersection, RectangleF boundBox, float vx, float vy ) : bool

보호된 메소드들

메소드 설명
Update ( ) : void

비공개 메소드들

메소드 설명
BlockByIntersection ( RectangleF myBox, RectangleF targetBox, bool uponly, bool downonly ) : bool
CheckEntityCollisions ( List blockEntities, MegaMan.Engine.CollisionBox hitbox, RectangleF boundbox, bool pushAway = true, bool solidOnly = true ) : RectangleF
CheckEnvironment ( List hitSquares, MegaMan.Engine.CollisionBox hitbox, bool pushAway = true ) : void
CheckEnvironmentTile ( List hitSquares, MegaMan.Engine.CollisionBox hitbox, RectangleF hitRect, MapSquare tile, PointF &offset, bool pushAway ) : void
CheckTargetBox ( MegaMan.Engine.CollisionBox hitbox, RectangleF boundBox, IEntity entity, CollisionComponent coll, MegaMan.Engine.CollisionBox targetBox ) : RectangleF
CheckTileProperty ( TileProperties tileProperty, string property ) : bool

See returns

ClearTouch ( ) : void
CollideWith ( IEntity entity, MegaMan.Engine.CollisionBox myBox, MegaMan.Engine.CollisionBox targetBox ) : void
CollisionBoxToCheck ( string boxName, string entityId ) : List

Returns list of boxes to check. If boxName is nulled, fetch active boxes of entity, else only return boxName.

CollisionWithAllEntities_RealTime ( MegaMan.Engine.CollisionBox box, string property, bool solidOnly = true, bool pushAway = false ) : bool

See return value. Fills hitBlockEntities with all/solid (see param solidOnly) entities hit

CollisionWithTiles_RealTime ( MegaMan.Engine.CollisionBox box, string property, bool pushAway = false ) : bool

See return value. Fills hitSquaresForFunctionThatChecksCollisions with blocks hit

FloatCorrect ( RectangleF rect ) : RectangleF
HitByBoxes ( MegaMan.Engine.CollisionBox hitbox ) : IEnumerable

Get the hitboxes that the calling box would be targeted by - use for blocking

Instance_GameRender ( GameRenderEventArgs e ) : void
Loadinfo ( CollisionComponentInfo info ) : void
ReactForHitbox ( List hitSquares, HashSet hitTypes, MegaMan.Engine.CollisionBox hitbox ) : void
ReactToTileEffect ( TileProperties properties ) : void
TargetBoxes ( MegaMan.Engine.CollisionBox hitbox ) : IEnumerable

Get the hitboxes that the calling box can target

Touch ( MegaMan.Engine.CollisionBox targetbox, MegaMan.Engine.CollisionBox mybox ) : void

메소드 상세

AddBox() 공개 메소드

public AddBox ( MegaMan.Engine.CollisionBox box ) : void
box MegaMan.Engine.CollisionBox
리턴 void

CheckIfOneEntityHitContainProperty() 공개 메소드

Function to check collision with solid objects which occured during game tick.
public CheckIfOneEntityHitContainProperty ( string property ) : bool
property string
리턴 bool

CheckIfOneEntityHitContainProperty_RealTime() 공개 메소드

Function to check RealTime collision with solid objects. (not in game loop). CollisionWithAllEntities_RealTime Must have been called before.
public CheckIfOneEntityHitContainProperty_RealTime ( string property ) : bool
property string
리턴 bool

CheckIfOneTileHitContainProperty() 공개 메소드

Function to check collisions with tiles that occured during tick.
public CheckIfOneTileHitContainProperty ( string property ) : bool
property string
리턴 bool

CheckIfOneTileHitContainProperty_RealTime() 공개 메소드

Function to check RealTime collision (not in game loop). CollisionWithTiles_RealTime Must have been called before.
public CheckIfOneTileHitContainProperty_RealTime ( string property ) : bool
property string
리턴 bool

Clone() 공개 메소드

public Clone ( ) : MegaMan.Engine.Component
리턴 MegaMan.Engine.Component

CollisionWithAllEntitiesAndTiles_RealTime() 공개 메소드

Function that checks collision with tiles and/or entities. Stops the checks as soon as one collision is found
IF MANY ENTITIES, ONLY FIRST ON IN LIST IS CHECKED
public CollisionWithAllEntitiesAndTiles_RealTime ( string boxName, string entity, string property, bool pushAway, bool solidOnly, bool checkTilesForCollisions, bool checkEntitiesForCollisions ) : bool
boxName string If null, pick every active box of entity picked
entity string If null, current entity
property string Example: Blocking
pushAway bool If a collision is found, need to push entity away?
solidOnly bool Applies to entities. Check only solid ones?
checkTilesForCollisions bool
checkEntitiesForCollisions bool
리턴 bool

Message() 공개 메소드

public Message ( IGameMessage msg ) : void
msg IGameMessage
리턴 void

RegisterDependencies() 공개 메소드

public RegisterDependencies ( MegaMan.Engine.Component component ) : void
component MegaMan.Engine.Component
리턴 void

Start() 공개 메소드

public Start ( IGameplayContainer container ) : void
container IGameplayContainer
리턴 void

Stop() 공개 메소드

public Stop ( IGameplayContainer container ) : void
container IGameplayContainer
리턴 void

TouchedAt() 공개 메소드

public TouchedAt ( string myGroup, string targetGroup = null ) : bool
myGroup string
targetGroup string
리턴 bool

TouchedBy() 공개 메소드

public TouchedBy ( string group ) : bool
group string
리턴 bool

Update() 보호된 메소드

protected Update ( ) : void
리턴 void

VerticalApproach() 공개 정적인 메소드

public static VerticalApproach ( RectangleF intersection, RectangleF boundBox, float vx, float vy ) : bool
intersection RectangleF
boundBox RectangleF
vx float
vy float
리턴 bool