Exemplo n.º 1
0
        public static void Draw()
        {
            if (ActiveScene != null)
            {
                //draw bg particle
                //if (ActiveScene.bg_particle != null)
                //{
                //    ActiveScene.DrawBGParticle(RenderContext);
                //}

                //draw HUD Belakang
                RenderContext.SpriteBatch.Begin();
                ActiveScene.DrawHUDBack(RenderContext);
                RenderContext.SpriteBatch.End();

                if (CameraManager.getInstance().camera.Focus == null)
                {
                    RenderContext.SpriteBatch.Begin();
                    ActiveScene.Draw(RenderContext);
                    RenderContext.SpriteBatch.End();
                }
                else
                {
                    RenderContext.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, CameraManager.getInstance().camera.Transform);
                    ActiveScene.Draw(RenderContext);
                    RenderContext.SpriteBatch.End();
                }

                //draw HUD Depan
                RenderContext.SpriteBatch.Begin();
                ActiveScene.DrawHUDFront(RenderContext);
                RenderContext.SpriteBatch.End();

                //ActiveScene.DrawParticle(RenderContext);
            }
        }