Exemplo n.º 1
0
        void mainGameComponent_Drawed(LayerType layerType)
        {
            switch (layerType)
            {
            case LayerType.AfterMarkEffect:
                userScoreListComponent.Draw();
                break;

            case LayerType.AfterMark:
                filterSprite.Draw();
                break;

            case LayerType.AfterInterface:
                if (gameRule.ItemAvailable)
                {
                    itemOverrayComponent.Draw();
                    itemManagerComponent.Draw();
                }

                if (paused)
                {
                    black.Hidden = false;
                    black.Alpha  = 0.5f;
                    black.Update();
                    black.Draw();
                    black.Hidden = true;
                    black.Alpha  = 0;
                    black.Update();
                }

                break;
            }
        }
Exemplo n.º 2
0
 void mainGameComponent_Drawed(LayerType layerType)
 {
     if (layerType == LayerType.AfterInterface && paused)
     {
         black.Hidden = false;
         black.Alpha  = 0.5f;
         black.Update();
         black.Draw();
         black.Hidden = true;
         black.Alpha  = 0;
         black.Update();
     }
 }
Exemplo n.º 3
0
        public void Draw_Context_CircleDrawn()
        {
            var ctx     = Substitute.For <IWorldContext>();
            var drawCtx = Substitute.For <IDrawContext>();
            var canvas  = Substitute.For <ICanvas>();

            drawCtx.Canvas.Returns(canvas);

            var target = new RectangleComponent(new Point(10, 20), ctx);

            target.Draw(drawCtx);

            canvas.Received().Draw(target.Transform.BoundingBox, true, '#'.White());
        }