Esempio n. 1
0
        public override void Initialize()
        {
            _mapMenu = new MapMenu(GuiServices);
            _mapMenu.StartClicked   += OnStartClicked;
            _mapMenu.OptionsClicked += OnOptionsClicked;

            AddElement(_mapMenu);
        }
Esempio n. 2
0
    void Awake()
    {
        if(master == null){
            // DontDestroyOnLoad(gameObject);
            master = this;
        } else if( master != this){

            Destroy(gameObject);
        }
    }
Esempio n. 3
0
 void Awake()
 {
     if (mapMenu == null)
     {
         DontDestroyOnLoad(gameObject);
         mapMenu = this;
     }
     else if (mapMenu != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 4
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }
Esempio n. 5
0
        protected override bool update_menu_map()
        {
            if (MapMenu != null)
            {
                MapMenu.Update();
                if (MapMenu != null && MapMenu.Finished)
                {
                    MapMenu = null;
                }
                return(true);
            }

            return(false);
        }
Esempio n. 6
0
        private void ShowContextMenu(TreeNode selectedNode, Point mouseLocation)
        {
            switch (selectedNode.Name.ToLower())
            {
            case "projectnode":
            {
                ProjectMenu.Show(mouseLocation);
                break;
            }

            case "mapsnode":
            {
                MapsMenu.Show(mouseLocation);
                break;
            }

            case "mapnode":
            {
                MapMenu.Show(mouseLocation);
                break;
            }

            case "tilesnode":
            {
                TilesMenu.Show(mouseLocation);
                break;
            }

            case "layernode":
            {
                if (selectedNode.Tag is TileLayer <Tile> )
                {
                    TileLayer <Tile> layer = (TileLayer <Tile>)selectedNode.Tag;
                    visibleToolStripMenuItem.Checked = layer.Visible;
                    LayerMenu.Show(mouseLocation);
                }
                break;
            }

            case "tilefilternode":
            {
                TilesMenu.Show(mouseLocation);
                break;
            }
            }
        }
Esempio n. 7
0
 /// <summary>
 /// Updates preparations menus. Returns true if an active menu was processed, so no other menus should be updated.
 /// </summary>
 protected bool update_preparations()
 {
     //@Debug: I think this is redundant with update_menu_map(), other than
     // the outermost if statement
     if (Global.game_system.preparations)
     {
         if (MapMenu != null)
         {
             MapMenu.Update();
             if (MapMenu != null && MapMenu.Finished)
             {
                 MapMenu = null;
             }
             return(true);
         }
     }
     return(false);
 }
Esempio n. 8
0
 public void OnMapButtonClicked()
 {
     MapMenu.Show();
 }
Esempio n. 9
0
 public void ShowContextMenu(GameSpawn context, Point location)
 {
     m_contextspawn = context;
     MapMenu.Show(this, location);
 }
Esempio n. 10
0
 private void Start()
 {
     MapMenu.Show();
 }
Esempio n. 11
0
 void Start()
 {
     mMenu = MapMenu.mapMenu;
 }