Nez.Portable/ECS/Components/Physics/TiledMapMover.cs
/// <summary>
/// moves the Entity taking into account the tiled map
/// </summary>
/// <param name="motion">Motion.</param>
/// <param name="boxCollider">Box collider.</param>
moves the Entity taking into account the tiled map
moves the Entity taking into account the tiled map
public void move(Vector2 motion, BoxCollider boxCollider, CollisionState collisionState)
        {
            testCollisions(ref motion, boxCollider.bounds, collisionState);
            boxCollider.unregisterColliderWithPhysicsSystem();
            boxCollider.entity.transform.position += motion;
            boxCollider.registerColliderWithPhysicsSystem();
        }
public void move ( Vector2 motion , BoxCollider boxCollider , CollisionState collisionState ) { testCollisions ( ref motion , boxCollider . bounds , collisionState ) ; boxCollider . unregisterColliderWithPhysicsSystem ( ) ; boxCollider . entity . transform . position += motion ; boxCollider . registerColliderWithPhysicsSystem ( ) ; }
moves the Entity taking into account the tiled map
moves the Entity taking into account the tiled map
// test for collisions then move the Entity
motion
Vector2
None
boxCollider
BoxCollider
None
collisionState
CollisionState