예제 #1
0
 public virtual void Draw(CharPixel pixel)
 {
     if (Painter != null)
     {
         Painter.Draw(pixel);
     }
 }
        public void Draw(IPainter <Color> painter, Point location, float scale)
        {
            var currentTexture = GetCurrentTexture();

            var texture = new Texture(currentTexture);

            painter.Draw(texture, location, scale, Color.White);
        }
예제 #3
0
        public void Update(float delayTime)
        {
            GameContext.Update(delayTime);
            spaceStore.Update();
            spaceUpdater.Update(spaceStore.GetGameObjects().ToList(), delayTime);
            var sprites = spaceStore.GetGameObjects().Where(o => o.Sprite != null).Select(o =>
            {
                o.Sprite.TransformToGameObject(o);
                return(o.Sprite);
            });

            painter.Draw(sprites, spaceStore.Camera);
        }
예제 #4
0
        public void t2()
        {
            CowboyPainter cp = new CowboyPainter();

            IPainter cPAINTER = cp;

            cPAINTER.Draw();

            ICowboy COWBOYp = cp;

            COWBOYp.Draw();

            (cp as IPainter).Draw();
            (cp as ICowboy).Draw();
        }
예제 #5
0
 public virtual void Draw(IPainter painter)
 {
   painter.Draw(this);
 }
예제 #6
0
 public virtual void Draw(IPainter painter)
 {
     painter.Draw(this);
 }
예제 #7
0
 public void Draw(IPainter painter)
 {
     painter.Draw(_BufferedGraphics.Graphics);
 }