Beispiel #1
0
        internal override void LoadContent()
        {
            World = new World();

            _locationSign = new LocationSign();
            _locationSign.LoadContent();
            World.MapChanged             += MapChanged;
            World.WildPokemonEncountered += OnWildEncounter;
            World.TextDisplayed          += (text) => ShowTextbox(text, false);

            Textbox = new Textbox();
            Textbox.LoadContent();

            StartMenu = new StartMenu(this);
            StartMenu.LoadContent();

            World.LoadContent();
            World.ChangeMap(Controller.ActivePlayer.Map);
            World.PlayerEntity.Position = Controller.ActivePlayer.Position + World.ActiveMap.Offset;

            _shader = new WorldShader(this);
            ((BasicEffect)_shader.Effect).LightingEnabled = false;

            _camera = new WorldCamera(World, World.PlayerEntity);
            //_camera = new TestCamera();
            //_camera.Position = World.PlayerEntity.Position + new Vector3(0, 2, 0);
            _batch        = new SpriteBatch(Controller.GraphicsDevice);
            _fontRenderer = new FontRenderer("main");
        }
Beispiel #2
0
        internal override void LoadContent()
        {
            _sceneTarget = RenderTargetManager.CreateScreenTarget();

            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _player          = Controller.Content.LoadDirect <Texture2D>("Textures/Battle/player.png");
            _pokeballOpening = Controller.Content.LoadDirect <Texture2D>("Textures/Battle/pokeballOpening.png");

            _fontRenderer = new PokemonFontRenderer();
            _fontRenderer.LoadContent();

            _battleTextbox = new Textbox();
            _battleTextbox.LoadContent();
            _battleTextbox.OffsetY = StartY + (int)(12 * Border.UNIT * Border.SCALE);

            _enemyPokemonStatus = new EnemyPokemonStatus();
            _enemyPokemonStatus.LoadContent();
            _playerPokemonStatus = new PlayerPokemonStatus();
            _playerPokemonStatus.LoadContent();
            _playerStatus = new PlayerStatus();
            _playerStatus.LoadContent();
            _pokemonStats = new PokemonStats();
            _pokemonStats.LoadContent();
        }
        internal override void LoadContent()
        {
            base.LoadContent();

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.OffsetY = StartY + (int)(12 * Border.UNIT * Border.SCALE);
        }
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _arrow           = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/arrow.png");
            _buttons         = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/buttons.png");
            _switchButton    = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/switchButton.png");
            _timeBox         = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/time.png");
            _mapOverlay      = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/mapOverlay.png");
            _phoneBackground = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/phoneBackground.png");
            _reception       = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Pokegear/reception.png");

            _fontRenderer = new PokemonFontRenderer();
            _fontRenderer.LoadContent();

            _contactsFontRenderer = new PokemonFontRenderer();
            _contactsFontRenderer.LoadContent();
            _contactsFontRenderer.LineGap = 0;

            _exitTextbox = new Textbox();
            _exitTextbox.LoadContent();
            _exitTextbox.ShowAndSkip("Press any button\nto exit.");
            _exitTextbox.OffsetY = (int)(Border.SCREEN_HEIGHT * Border.SCALE * Border.UNIT - Textbox.HEIGHT * Border.UNIT * Border.SCALE);

            _phoneTextbox = new Textbox();
            _phoneTextbox.LoadContent();
            _phoneTextbox.ShowAndSkip("Whom do you want\nto call?");
            _phoneTextbox.OffsetY = (int)(Border.SCREEN_HEIGHT * Border.SCALE * Border.UNIT - Textbox.HEIGHT * Border.UNIT * Border.SCALE);

            _phoneOptionsBox = new OptionsBox();
            _phoneOptionsBox.LoadContent();
            _phoneOptionsBox.OffsetY     = _phoneTextbox.OffsetY;
            _phoneOptionsBox.OffsetX    += (int)(Border.SCALE * Border.UNIT * 9);
            _phoneOptionsBox.BufferUp    = 1;
            _phoneOptionsBox.BufferRight = 1;

            _deleteNumberOptionsBox = new OptionsBox();
            _deleteNumberOptionsBox.LoadContent();
            _deleteNumberOptionsBox.OffsetY  = _phoneTextbox.OffsetY;
            _deleteNumberOptionsBox.OffsetX += (int)(Border.SCALE * Border.UNIT * 14);

            // TODO: get correct location from world
            _mapScreen = new TownMapScreen(null, "kanto", "Pallet Town");
            _mapScreen.LoadContent();

            _phonebook = Phonebook.Load();
        }
Beispiel #5
0
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.OffsetY = (int)(Border.SCREEN_HEIGHT * Border.SCALE * Border.UNIT - Textbox.HEIGHT * Border.UNIT * Border.SCALE);

            _optionsBox = new OptionsBox();
            _optionsBox.LoadContent();
            _optionsBox.OffsetY = 0;

            _confirmationBox = new OptionsBox();
            _confirmationBox.LoadContent();
            _confirmationBox.OffsetX += (int)(Border.SCALE * Border.UNIT * 14);

            ShowMain();
        }
        public override void LoadContent()
        {
            name = new Textbox()
            {
                pane = new Pane()
                {
                    buttonLeft   = game.Content.Load <Texture2D>("button/left"),
                    buttonMiddle = game.Content.Load <Texture2D>("button/middle"),
                    buttonRight  = game.Content.Load <Texture2D>("button/right"),
                    rect         = new Rectangle(200, 200, 500, 50)
                },
                dummyText = "Enter...",
                font      = game.Content.Load <SpriteFont>("font"),
                paddingX  = 10,
                game      = game,
                pixel     = game.Content.Load <Texture2D>("pixel")
            }; name.LoadContent();

            base.LoadContent();
        }
Beispiel #7
0
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _fontRenderer = new PokemonFontRenderer();
            _fontRenderer.LoadContent();

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.Show("Would you like to\nsave the game?");
            _textbox.Finished += TextboxFinished;

            _optionsBox = new OptionsBox();
            _optionsBox.LoadContent();
            _optionsBox.OptionSelected += SelectedQuestion;

            var unit = (int)(Border.UNIT * Border.SCALE);

            _optionsBox.OffsetY = unit * 12;
            _textbox.OffsetY    = unit * 12;
        }
Beispiel #8
0
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.OffsetY = _offsetY + (int)(12 * Border.UNIT * Border.SCALE);

            _optionsBox = new OptionsBox();
            _optionsBox.LoadContent();
            _optionsBox.OffsetY  = _textbox.OffsetY;
            _optionsBox.OffsetX += (int)(Border.SCALE * Border.UNIT * 14);

            _moveSelectBox = new OptionsBox();
            _moveSelectBox.LoadContent();
            _moveSelectBox.OffsetY  = _textbox.OffsetY;
            _moveSelectBox.OffsetX += (int)(Border.SCALE * Border.UNIT * 5);
            _moveSelectBox.BufferUp = 1;

            ShowInitialQuestion();
        }
Beispiel #9
0
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _fontRenderer = new PokemonFontRenderer();
            _fontRenderer.LoadContent();

            _oak        = Controller.Content.LoadDirect <Texture2D>("Textures/UI/NewGame/oak.png");
            _player     = Controller.Content.LoadDirect <Texture2D>("Textures/UI/NewGame/player.png");
            _namingIcon = Controller.Content.LoadDirect <Texture2D>("Textures/UI/NewGame/namingIcon.png");

            _random         = new Random();
            _previewPokemon = Pokemon.Get(POKEMON_PREVIEW_IDS[_random.Next(0, POKEMON_PREVIEW_IDS.Length)], 1);

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.OffsetY = GameController.RENDER_HEIGHT / 2 - (int)(Border.SCALE * Border.UNIT * Border.SCREEN_HEIGHT) / 2 + (int)(12 * Border.UNIT * Border.SCALE);

            _nameSelection = new OptionsBox();
            _nameSelection.LoadContent();
            _nameSelection.BufferUp  = 1;
            _nameSelection.CanCancel = false;
        }
Beispiel #10
0
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _arrow = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Computer/arrow2.png");

            _fontRenderer = new PokemonFontRenderer();
            _fontRenderer.LoadContent();

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.OffsetY = (int)(Border.SCREEN_HEIGHT * Border.SCALE * Border.UNIT - Textbox.HEIGHT * Border.UNIT * Border.SCALE);

            _optionsBox = new OptionsBox();
            _optionsBox.LoadContent();
            _optionsBox.OffsetY  = _textbox.OffsetY;
            _optionsBox.OffsetX += (int)(Border.SCALE * Border.UNIT * 14);

            _amountSelector = new AmountSelector();
            _amountSelector.LoadContent();
            _amountSelector.OffsetY = _textbox.OffsetY - (int)(Border.SCALE * Border.UNIT * AmountSelector.HEIGHT);

            SetItems();
        }
Beispiel #11
0
        internal override void LoadContent()
        {
            _batch = new SpriteBatch(Controller.GraphicsDevice);

            _arrow = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Computer/arrow2.png");

            _fontRenderer = new PokemonFontRenderer();
            _fontRenderer.LoadContent();

            _textbox = new Textbox();
            _textbox.LoadContent();
            _textbox.OffsetY = (int)(Border.SCREEN_HEIGHT * Border.SCALE * Border.UNIT - Textbox.HEIGHT * Border.UNIT * Border.SCALE);

            _optionsBox = new OptionsBox();
            _optionsBox.LoadContent();
            _optionsBox.BufferUp = 1;

            _confirmationBox = new OptionsBox();
            _confirmationBox.LoadContent();
            _confirmationBox.OffsetX += (int)(Border.SCALE * Border.UNIT * 14);
            _confirmationBox.OffsetY  = _textbox.OffsetY;

            SetMails();
        }