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

            AddElement(_mapMenu);
        }
示例#2
0
    void Awake()
    {
        if(master == null){
            // DontDestroyOnLoad(gameObject);
            master = this;
        } else if( master != this){

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

            return(false);
        }
示例#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;
            }
            }
        }
示例#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);
 }
示例#8
0
 public void OnMapButtonClicked()
 {
     MapMenu.Show();
 }
示例#9
0
 public void ShowContextMenu(GameSpawn context, Point location)
 {
     m_contextspawn = context;
     MapMenu.Show(this, location);
 }
示例#10
0
 private void Start()
 {
     MapMenu.Show();
 }
示例#11
0
 void Start()
 {
     mMenu = MapMenu.mapMenu;
 }