public void ManageFloorCollisions(List<MainFloor> platforms) { CollisionHandler CH = new CollisionHandler(); if (!onFloor) { foreach (Sprite s in platforms) { if (CH.Collides(this, s)) { onFloorSprite = s; mCurrentState = State.Walking; Position.Y = s.Position.Y - (int)(this.SpriteTexture.Height * this.Scale); onFloor = true; mVelocity.Y = 0; break; } } } }
public void ManageFloorContact() { if (onFloorSprite != null) { CollisionHandler CH = new CollisionHandler(); //Put in checking for /*if(!CH.Collides(this, onFloorSprite)) { onFloor = false; onFloorSprite = null; }*/ } }