public PaddleBlockCollisionHandler(CollisionData collision) { this.collision = collision; collisionSide = (ICollisionSide)collision.CollisionSide; if (collision.GameObjectA is IPaddle) { paddle = (IPaddle)collision.GameObjectA; } else { paddle = (IPaddle)collision.GameObjectB; collisionSide = collisionSide.FlipSide(); } }
private void HandleNormalTopOrBottomEnemyCollision() { if (!(enemyA is Boo)) { if (side is TopSideCollision) { collision.ResolveOverlap(enemyA, side); } else { collision.ResolveOverlap(enemyB, side.FlipSide()); } } }
public WolverinePipeCollisionHandler(CollisionData collision) { this.collision = collision; collisionSide = (ICollisionSide)collision.CollisionSide; if (collision.GameObjectA is IWolverine) { enemy = (IWolverine)collision.GameObjectA; } else { enemy = (IWolverine)collision.GameObjectB; collisionSide = collisionSide.FlipSide(); } }
public BuckeyeTileCollisionHandler(CollisionData collision) { this.collision = collision; collisionSide = (ICollisionSide)collision.CollisionSide; if (collision.GameObjectA is IBuckeyePlayer) { player = (IBuckeyePlayer)collision.GameObjectA; } else { player = (IBuckeyePlayer)collision.GameObjectB; collisionSide = collisionSide.FlipSide(); } }
public ItemPipeCollisionHandler(CollisionData collision) { this.collision = collision; side = collision.CollisionSide; if (collision.GameObjectA is IItem) { collidingItem = (IItem)collision.GameObjectA; } else { collidingItem = (IItem)collision.GameObjectB; side = side.FlipSide(); } }
public EnemyPipeCollisionHandler(CollisionData collision) { this.collision = collision; side = collision.CollisionSide; if (collision.GameObjectA is IEnemy) { enemy = (IEnemy)collision.GameObjectA; } else { enemy = (IEnemy)collision.GameObjectB; side = side.FlipSide(); } }
public PaddleBallItemCollisionHandler(CollisionData collision, IGameState gameState) { brickBreakerGameState = gameState; collisionSide = (ICollisionSide)collision.CollisionSide; if (collision.GameObjectA is IPaddle) { paddleBall = (IPaddleBall)collision.GameObjectA; collidingItem = (IItem)collision.GameObjectB; } else { paddleBall = (IPaddleBall)collision.GameObjectB; collidingItem = (IItem)collision.GameObjectA; collisionSide = collisionSide.FlipSide(); } }
public EnemyElevatorCollisionHandler(CollisionData collision, IGameState gameState) { this.collision = collision; this.gameState = gameState; side = collision.CollisionSide; if (collision.GameObjectA is IEnemy) { enemy = (IEnemy)collision.GameObjectA; } else { enemy = (IEnemy)collision.GameObjectB; side = side.FlipSide(); } }
public MarioBlockCollisionHandler(CollisionData collision) { this.collision = collision; collisionSide = (ICollisionSide)collision.CollisionSide; if (collision.GameObjectA is IMario) { collidingMario = (IMario)collision.GameObjectA; collidingBlock = (Block)collision.GameObjectB; } else { collidingMario = (IMario)collision.GameObjectB; collidingBlock = (Block)collision.GameObjectA; collisionSide = collisionSide.FlipSide(); } }
public MarioEnemyCollisionHandler(CollisionData collision) { this.collision = collision; side = collision.CollisionSide; if (collision.GameObjectA is IMario) { mario = (IMario)collision.GameObjectA; enemy = (IEnemy)collision.GameObjectB; } else { mario = (IMario)collision.GameObjectB; enemy = (IEnemy)collision.GameObjectA; side = side.FlipSide(); } }
public BuckeyeWolverineCollisionHandler(CollisionData collision) { this.collision = collision; side = collision.CollisionSide; if (collision.GameObjectA is IBuckeyePlayer) { player = (IBuckeyePlayer)collision.GameObjectA; enemy = (IWolverine)collision.GameObjectB; } else { player = (IBuckeyePlayer)collision.GameObjectB; enemy = (IWolverine)collision.GameObjectA; side = side.FlipSide(); } }
public PaddleBallBlockCollisionHandler(CollisionData collision, IGameState gameState) { this.collision = collision; brickBreakerGameState = gameState; collisionSide = (ICollisionSide)collision.CollisionSide; if (collision.GameObjectA is IPaddleBall) { collidingBall = (IPaddleBall)collision.GameObjectA; collidingBlock = (IBlock)collision.GameObjectB; } else { collidingBall = (IPaddleBall)collision.GameObjectB; collidingBlock = (IBlock)collision.GameObjectA; collisionSide = collisionSide.FlipSide(); } }
public MarioPipeCollisionHandler(CollisionData collision, IGameState gameState) { this.collision = collision; this.gameState = gameState; side = collision.CollisionSide; if (collision.GameObjectA is IMario) { mario = (IMario)collision.GameObjectA; pipe = (IPipe)collision.GameObjectB; } else { mario = (IMario)collision.GameObjectB; pipe = (IPipe)collision.GameObjectA; side = side.FlipSide(); } }
public BuckeyePipeCollisionHandler(CollisionData collision, IGameState gameState) { this.collision = collision; this.gameState = gameState; side = collision.CollisionSide; if (collision.GameObjectA is IBuckeyePlayer) { player = (IBuckeyePlayer)collision.GameObjectA; pipe = (IPipe)collision.GameObjectB; } else { player = (IBuckeyePlayer)collision.GameObjectB; pipe = (IPipe)collision.GameObjectA; side = side.FlipSide(); } }