Exemplo n.º 1
0
        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;
                    }
                }
            }
        }
Exemplo n.º 2
0
        public void ManageFloorContact()
        {
            if (onFloorSprite != null)
            {
                CollisionHandler CH = new CollisionHandler();

                //Put in checking for
                /*if(!CH.Collides(this, onFloorSprite))
                {
                    onFloor = false;
                    onFloorSprite = null;
                }*/
            }
        }