Esempio n. 1
0
        private Window GetForm(GameForm form)
        {
            Window window;

            switch (form)
            {
            case GameForm.LOGIN_FORM:
                window = (new LoginForm(manager)).Window;
                break;

            case GameForm.TANK_LIST_FORM:
                window = new TankList(manager).Window;
                break;

            case GameForm.TANK_CREATION_FORM:
                window = new TankCreation(manager).Window;
                break;

            case GameForm.TANK_EDIT_FORM:
                window = new Window(manager);
                break;

            case GameForm.SERVER_LIST_FORM:
                window = new Window(manager);
                break;

            case GameForm.LOADING_SCREEN_FORM:
                window = new Window(manager);
                break;

            case GameForm.GAMEPLAY_FORM:
                window = new Window(manager);
                break;

            default:
                window = new Window(manager);
                break;
            }

            return(window);
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor: Will automatically select the tank that is passed in if it exists.
        /// </summary>
        public TankListState(VTankObject.TankAttributes _selectedTank)
        {
            ServiceManager.Game.Renderer.ActiveScene.ClearAll();
            form = new TankList(ServiceManager.Game.Manager);
            form.CreateButton.Click += new TomShane.Neoforce.Controls.EventHandler(CreateButton_Click);
            form.EditButton.Click += new TomShane.Neoforce.Controls.EventHandler(EditButton_Click);
            form.DeleteButton.Click += new TomShane.Neoforce.Controls.EventHandler(DeleteButton_Click);
            form.PlayButton.Click += new TomShane.Neoforce.Controls.EventHandler(PlayButton_Click);
            form.BackButton.Click += new TomShane.Neoforce.Controls.EventHandler(BackButton_Click);
            form.SelectionChanged += new TomShane.Neoforce.Controls.EventHandler(SelectionChanged);

            form.PlayButton.Enabled = false;
            form.EditButton.Enabled = false;
            form.DeleteButton.Enabled = false;

            selectedTank = _selectedTank;
            RefreshTankList();

            ServiceManager.Game.Renderer.ActiveScene.SwitchCamera("Tank Display View");
            GraphicOptions.graphics.GraphicsDevice.RenderState.DepthBufferEnable = true;
            Renderer.GraphicOptions.BackgroundColor = Color.Black;
        }
Esempio n. 3
0
        private Window GetForm(GameForm form)
        {
            Window window;

            switch (form)
            {
                case GameForm.LOGIN_FORM:
                    window = (new LoginForm(manager)).Window;
                    break;

                case GameForm.TANK_LIST_FORM:
                    window = new TankList(manager).Window;
                    break;

                case GameForm.TANK_CREATION_FORM:
                    window = new TankCreation(manager).Window;
                    break;

                case GameForm.TANK_EDIT_FORM:
                    window = new Window(manager);
                    break;

                case GameForm.SERVER_LIST_FORM:
                    window = new Window(manager);
                    break;

                case GameForm.LOADING_SCREEN_FORM:
                    window = new Window(manager);
                    break;

                case GameForm.GAMEPLAY_FORM:
                    window = new Window(manager);
                    break;

                default:
                    window = new Window(manager);
                    break;
            }

            return window;
        }