コード例 #1
0
 public InnerGameState(StateSystem system,
                       Input input,
                       PersistantGameData gameData,
                       FontManager fontManager,
                       TextureManager textureManager)
 {
     _system         = system;
     _input          = input;
     _gameData       = gameData;
     _fontManager    = fontManager;
     _textureManager = textureManager;
     OnGameStart();
 }
コード例 #2
0
        public Level(Input input, TextureManager textureManager,
                     PersistantGameData gameData)
        {
            _input          = input;
            _gameData       = gameData;
            _textureManager = textureManager;

            _background = new ScrollingBackground(textureManager.Get("background"));
            _background.SetScale(2, 2);
            _background.Speed = 0.15f;

            _backgroundLayer       = new ScrollingBackground(textureManager.Get("background_layer_1"));
            _backgroundLayer.Speed = 0.1f;
            _backgroundLayer.SetScale(2.0, 2.0);

            _playerCharacter = new PlayerCharacter(_textureManager);
        }
コード例 #3
0
        public GameOverState(PersistantGameData data, StateSystem system,
                             Input input, FontManager fontManager)
        {
            _gameData    = data;
            _system      = system;
            _input       = input;
            _fontManager = fontManager;

            _titleWin  = new Text("Complete!", _fontManager.Get("title_font"));
            _blurbWin  = new Text("Congradulations, you won!", _fontManager.Get("general_font"));
            _titleLose = new Text("Game Over!", _fontManager.Get("title_font"));
            _blurbLose = new Text("Please try again...", _fontManager.Get("general_font"));

            FormatText(_titleWin, 300);
            FormatText(_blurbWin, 200);

            FormatText(_titleLose, 300);
            FormatText(_blurbLose, 200);
        }