public override void BeginDraw(CustomSpriteBatch g)
        {
            g.BeginUnscaled(SpriteSortMode.Deferred, BlendState.AlphaBlend);
            GraphicsDevice.Clear(Color.Black);

            foreach (Player ActiveRobot in Room.ListRoomPlayer)
            {
                if (ActiveRobot.CharacterPreview != null)
                {
                    ActiveRobot.CharacterPreview.BeginDraw(g);
                }
            }

            g.End();
        }
Ejemplo n.º 2
0
        public override void BeginDraw(CustomSpriteBatch g)
        {
            g.BeginUnscaled(SpriteSortMode.Deferred, BlendState.AlphaBlend);
            GraphicsDevice.Clear(Color.Black);

            if (ShowUnits && MapOverlay != null)
            {
                MapOverlay.BeginDraw(g);
                BeginDrawNightOverlay(g);
            }

            LayerManager.BeginDraw(g);

            g.End();
        }
Ejemplo n.º 3
0
        public override void BeginDraw(CustomSpriteBatch g)
        {
            g.BeginUnscaled(SpriteSortMode.Deferred, BlendState.AlphaBlend);
            GraphicsDevice.Clear(Color.Black);

            if (ShowAllLayers)
            {
                for (int i = 0; i < ListLayer.Count; ++i)
                {
                    ListLayer[i].BeginDraw(g);
                }
            }
            else
            {
                ListLayer[ActiveLayerIndex].BeginDraw(g);
            }

            g.End();
        }
        public override void BeginDraw(CustomSpriteBatch g)
        {
            g.BeginUnscaled(SpriteSortMode.Deferred, BlendState.AlphaBlend);
            GraphicsDevice.Clear(Color.Black);

            base.BeginDraw(g);

            g.End();

            if (ActiveCharacter != null && ActiveCharacter.IsAnimated)
            {
                ActiveCharacter.ActiveAnimation.BeginDraw(g);
            }

            for (int L = 0; L < ListAnimationLayer.Count; L++)
            {
                if (ListAnimationLayer[L].renderTarget.Width != GraphicsDevice.PresentationParameters.BackBufferWidth ||
                    ListAnimationLayer[L].renderTarget.Height != GraphicsDevice.PresentationParameters.BackBufferHeight)
                {
                    ListAnimationLayer[L].renderTarget = new RenderTarget2D(
                        GraphicsDevice,
                        GraphicsDevice.PresentationParameters.BackBufferWidth,
                        GraphicsDevice.PresentationParameters.BackBufferHeight);
                }
                for (int M = 0; M < ListAnimationLayer[L].ListActiveMarker.Count; M++)
                {
                    AnimationClass ActiveMarkerAnimation = ListAnimationLayer[L].ListActiveMarker[M].AnimationMarker;

                    for (int i = 0; i < ActiveMarkerAnimation.ListAnimationLayer.Count; i++)
                    {
                        if (ActiveMarkerAnimation.ListAnimationLayer[i].renderTarget == null ||
                            ActiveMarkerAnimation.ListAnimationLayer[i].renderTarget.Width != GraphicsDevice.PresentationParameters.BackBufferWidth ||
                            ActiveMarkerAnimation.ListAnimationLayer[i].renderTarget.Height != GraphicsDevice.PresentationParameters.BackBufferHeight)
                        {
                            ActiveMarkerAnimation.ListAnimationLayer[i].renderTarget = new RenderTarget2D(
                                GraphicsDevice,
                                GraphicsDevice.PresentationParameters.BackBufferWidth,
                                GraphicsDevice.PresentationParameters.BackBufferHeight);
                        }
                    }
                }

                for (int M = 0; M < ListAnimationLayer[L].ListActiveMarker.Count; M++)
                {
                    AnimationClass ActiveMarkerAnimation = ListAnimationLayer[L].ListActiveMarker[M].AnimationMarker;

                    for (int i = 0; i < ActiveMarkerAnimation.ListAnimationLayer.BasicLayerCount; i++)
                    {
                        GraphicsDevice.SetRenderTarget(ActiveMarkerAnimation.ListAnimationLayer[i].renderTarget);
                        GraphicsDevice.Clear(Color.Transparent);
                        //Don't draw submarkers.
                        DrawLayer(g, ActiveMarkerAnimation.ListAnimationLayer[i], false, null);
                    }
                }

                GraphicsDevice.SetRenderTarget(ListAnimationLayer[L].renderTarget);
                GraphicsDevice.Clear(Color.Transparent);

                DrawLayer(g, ListAnimationLayer[L], true, null);
            }
        }