private static void loadProp(String s)
        {
            string[] data   = s.Split(':');
            int      xTex   = int.Parse(data[0]);
            int      yTex   = int.Parse(data[1]);
            float    x      = float.Parse(data[2]) * MULTI;
            float    y      = (float.Parse(data[3]) * MULTI * -1) - PropTile.HEIGHT;
            float    height = float.Parse(data[4]) * MULTI;

            PropTile tile = new PropTile(new Vector2(x, y));

            tile.setRectangle((int)x, (int)y, (int)height, (int)height);
            tile.setPropTexture(xTex, yTex);
            Game1.middle.Add(tile);
        }
Exemple #2
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            var mouseEventArgs = e as MouseEventArgs;

            if (mouseEventArgs != null)
            {
                int x = mouseEventArgs.X;
                int y = mouseEventArgs.Y;

                int xTex = x / 36;
                int yTex = y / 36;
                if (yTex == 1 && xTex >= 8)
                {
                    return;
                }

                tile.setPropTexture(xTex, yTex);
                this.Close();
            }
        }