Beispiel #1
0
        /// <summary>
        /// Handles the customers taxi tour
        /// (the timers and the customer getting picked up)
        /// </summary>
        public void TaxiTour(Player player, CustomerEntity customer)
        {
            if (player.physics.IsGrounded &&
                Math.Abs(customer.Entity.Shape.Position.Y - player.Entity.Shape.Position.Y) < 0.05 &&
                customer.CountHasExpired())
            {
                customer.pickedUp = true;
                customer.timeToDrop.ResetTimer();
            }

            if (customer.pickedUp && customer.TimeToDropHasExpired())
            {
                player.Entity.DeleteEntity();
            }
        }
Beispiel #2
0
        public void RenderState()
        {
            backGroundImage.RenderEntity();
            score.RenderScore();
            parser.textureList.RenderEntities();


            if (!player.Entity.IsDeleted())
            {
                player.RenderPlayer();
            }

            if (!customer.pickedUp && customer.CountHasExpired())
            {
                customer.Entity.RenderEntity();
            }


            if (player.Entity.IsDeleted())
            {
                col.explosions.RenderAnimations();
                col.GameOver.RenderText();
            }
        }