Example #1
0
        public static void Initialize(GameScreen initialGameScreen)
        {
            _currentGameState = CurrentGameState.Loading;

              _loadingScreen = new SplashScreen();
              _loadingScreen.Initialise();
        }
Example #2
0
        public static void ShowTitleScreen()
        {
            _titleScreen = new TitleScreen();
              _currentGameState = CurrentGameState.TitleScreen;

              _titleScreen.Initialise();
        }
Example #3
0
        public override void Initialise()
        {
            //this.Elements.Add(new Background(NibblyFishGame.Textures.background1.ToString()));

            _aquariumScreen = new AquariumScreen();

            this.Children.Add(_aquariumScreen);

            _aquariumScreen.Initialise();

            GameViewport = new ExLib.Other.Viewport(0, 0, (int)(GraphicsManager.RESOLUTION_X * 0.5), (int)(GraphicsManager.RESOLUTION_Y * 0.5), GraphicsManager.RESOLUTION_X, GraphicsManager.RESOLUTION_Y);
        }
Example #4
0
        public static void StartNewGame()
        {
            _inGameScreen = new IngameScreen();

            _inGameScreen.Initialise();

            LevelManager.Initialise();

            LevelManager.SetLevel(4);

            var allElements = LevelManager.CurrentLevel.GetAllElements();

            allElements.ForEach(c => _inGameScreen.Elements.Add(c));

            // Add player frogs
            Actor player = new Frog()
            {
                Sprite = GraphicsManager.GetSprite(FroggerGame.Textures.GreenFrog),
                X = 320,
                Y = 448,
                MovementBehaviour = new KeyboardMovementBehaviour(0)
            };

            Players.Add(player);

            Actor car = new Car()
            {
                Sprite = GraphicsManager.GetSprite(FroggerGame.Textures.Car),
                X = GraphicsManager.RESOLUTION_X,
                Y = 230
            };

            _inGameScreen.Elements.Add(player);
            _inGameScreen.Elements.Add(car);

            car.Initialize();
            player.Initialize();

            _currentGameState = CurrentGameState.Ingame;
        }
Example #5
0
        public static void StartNewGame()
        {
            _inGameScreen = new IngameScreen();
            _currentGameState = CurrentGameState.Ingame;

            _inGameScreen.Initialise();
        }