Пример #1
0
        public void OnCollision(Ship ship)
        {
            //Determines should actor keep falling
            bool Falling = ship.GetBoundingBox().Max.Y > (GetBoundingBox().Min.Y + GetBoundingBox().Max.Y) / 2;

            //If no longer falling
            if (!Falling)
            {
                //Stop jumping
                m_Jumping                = false;
                m_Model.YVelocity        = 0.0f;
                m_Model.CurrentAnimation = "Walking";

                //Set last ship visited
                m_LastShip = ship;

                //Place it on the ship
                m_Model.Y = ship.GetBoundingBox().Max.Y;
            }
        }
Пример #2
0
        public void OnCollision(Ship ship)
        {
            //Determines should actor keep falling
            bool Falling = ship.GetBoundingBox().Max.Y > (GetBoundingBox().Min.Y + GetBoundingBox().Max.Y)/2;

            //If no longer falling
            if (!Falling) {
                //Stop jumping
                m_Jumping                   = false;
                m_Model.YVelocity           = 0.0f;
                m_Model.CurrentAnimation    = "Walking";

                //Set last ship visited
                m_LastShip = ship;

                //Place it on the ship
                m_Model.Y = ship.GetBoundingBox().Max.Y;
            }
        }