C# Class Nez.Mover

helper class illustrating one way to handle movement taking into account all Collisions including triggers. The ITriggerListener interface is used to manage callbacks to any triggers that are breached while moving. An object must move only via the Mover.move method for triggers to be properly reported. Note that multiple Movers interacting with each other will end up calling ITriggerListener multiple times.
Inheritance: Component
Show file Open project: prime31/Nez

Public Methods

Method Description
move ( Vector2 motion, CollisionResult &collisionResult ) : bool

moves the entity taking collisions into account

onAddedToEntity ( ) : void

Method Details

move() public method

moves the entity taking collisions into account
public move ( Vector2 motion, CollisionResult &collisionResult ) : bool
motion Microsoft.Xna.Framework.Vector2 Motion.
collisionResult CollisionResult Collision result.
return bool

onAddedToEntity() public method

public onAddedToEntity ( ) : void
return void