Exemplo n.º 1
0
        public void Update(PixelSetter setColorFun)
        {
            Bitmap bitmap = new Bitmap(Width, Height);

            using (var g = Graphics.FromImage(bitmap))
            {
                for (var i = 0; i < pixelsY; i++)
                {
                    for (var j = 0; j < pixelsX; j++)
                    {
                        var color = setColorFun(j, i);
                        g.FillRectangle(color, i * TileWidth, j * TileHeight, TileWidth, TileHeight);
                    }
                }
                Image = bitmap;
            }
            this.Update();
        }
Exemplo n.º 2
0
        public void Update(PixelSetter setColorFun)
        {
            Bitmap bitmap = new Bitmap(Width, Height);
            using (var g = Graphics.FromImage(bitmap))
            {

                for (var i = 0; i < pixelsY; i++)
                {
                    for (var j = 0; j < pixelsX; j++)
                    {
                        var color = setColorFun(j, i);
                        g.FillRectangle(color, i * TileWidth, j * TileHeight, TileWidth, TileHeight);
                    }
                }
                Image = bitmap;
            }
            this.Update();
        }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     ps         = (PixelSetter)GameObject.Find("Plane").GetComponent("PixelSetter");
     m_Animator = GetComponent <Animator>();
     audio      = GetComponent <AudioSource> ();
 }