Ejemplo n.º 1
0
 /// <summary>
 /// Init function for this GridManager class
 /// </summary>
 /// <param name="gridCanvas">Reference to grid canvas to set</param>
 /// <param name="tilesetManager">Reference to the TilesetManager to set</param>
 /// <param name="paintManager">Reference to the PaintManager to set</param>
 /// <param name="stackPanel">Reference to the grid layer stack panel to set</param>
 /// <param name="gridWidth">Grid canvas width to set</param>
 /// <param name="gridHeight">Grid canvas height to set</param>
 public void Init(Canvas gridCanvas, TileSetManager tilesetManager, PaintManager paintManager, StackPanel stackPanel, int gridWidth, int gridHeight)
 {
     m_GridCanvas          = gridCanvas;
     m_GridLayerStackPanel = stackPanel;
     m_TileSetManager      = tilesetManager;
     m_PaintManager        = paintManager;
     m_LayerIndex          = -1;
     m_GridWidth           = gridWidth;
     m_GridHeight          = gridHeight;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Main constructor of program
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();

            ///Setting all manager and upper classes to be a new instance
            m_PaintManager   = new PaintManager();
            m_TileSetManager = new TileSetManager();
            m_GridManager    = new GridManager();
            m_SaveClass      = new Save();

            ///Initializing all manager and upper classes
            m_PaintManager.Init(m_GridManager, m_TileSetManager);
            m_TileSetManager.Init(TileSetCanvas);
            m_GridManager.Init(canvas1, m_TileSetManager,
                               m_PaintManager, LayerStackPanel,
                               int.Parse(WidthInput.Text), int.Parse(HeightInput.Text));

            //Calling click create room function to make a room by default when program starts up
            CreateGridRoom(new object(), new RoutedEventArgs());
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Init function for this PaintManager class
 /// </summary>
 /// <param name="gridManager">grid manager to set</param>
 /// <param name="tilesetManager">tileset manager to set</param>
 public void Init(GridManager gridManager, TileSetManager tilesetManager)
 {
     m_GridManager    = gridManager;
     m_TilesetManager = tilesetManager;
 }