示例#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);
 }