Exemple #1
0
        public Editor(ZoombaSmasher zoomba)
            : base(zoomba)
        {
            this.zoomba = zoomba;
            mapDir = Path.Combine(zoomba.Content.RootDirectory, basePath);
            rows = 30;
            columns = 40;
            squares = new MapSquare[rows,columns];
            windowWidth = zoomba.graphics.PreferredBackBufferWidth;
            windowHeight = zoomba.graphics.PreferredBackBufferHeight;
            squareWidth = windowWidth / columns;
            squareHeight = windowHeight / rows;
            saver = new Saver(this);
            saver.Bounds = new Rectangle(windowWidth / 4, windowHeight / 4,
                windowWidth / 2, windowHeight / 2);
            saver.Text = "";
            cursor = new Cursor(zoomba, windowWidth / 2, windowHeight / 2);
            actions = new Actions();
            loader = new Loader(this);

            SetValidNameCharacters();
        }
Exemple #2
0
 public Cursor(ZoombaSmasher p_zoomba, int p_X, int p_Y)
 {
     zoomba = p_zoomba;
     X = p_X;
     Y = p_Y;
     Width = 10;
     Height = 10;
     color = new Color(112, 219, 255);
 }