コード例 #1
0
ファイル: Level.cs プロジェクト: iq110/csharpgameprogramming
 public Level(Input input, TextureManager textureManager, PersistantGameData gameData)
 {
     _input = input;
     _gameData = gameData;
     _textureManager = textureManager;
     _playerCharacter = new PlayerCharacter(_textureManager);
 }
コード例 #2
0
 public InnerGameState(  StateSystem system, Input input, TextureManager textureManager, 
                         PersistantGameData gameData, Font generalFont)
 {
     _textureManager = textureManager;
     _input = input;
     _system = system;
     _gameData = gameData;
     _generalFont = generalFont;
     OnGameStart();
 }
コード例 #3
0
        public GameOverState(PersistantGameData data, StateSystem system, Input input, Font generalFont, Font titleFont)
        {
            _gameData = data;
            _system = system;
            _input = input;
            _generalFont = generalFont;
            _titleFont = titleFont;

            _titleWin = new Text("Complete!", _titleFont);
            _blurbWin = new Text("Congratulations, you won!", _generalFont);

            _titleLose = new Text("Game Over!", _titleFont);
            _blurbLose = new Text("Please try again...", _generalFont);

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

            FormatText(_titleLose, 300);
            FormatText(_blurbLose, 200);
        }
コード例 #4
0
        public GameOverState(PersistantGameData data, StateSystem system, Input input, Font generalFont, Font titleFont)
        {
            _gameData    = data;
            _system      = system;
            _input       = input;
            _generalFont = generalFont;
            _titleFont   = titleFont;

            _titleWin = new Text("Complete!", _titleFont);
            _blurbWin = new Text("Congratulations, you won!", _generalFont);

            _titleLose = new Text("Game Over!", _titleFont);
            _blurbLose = new Text("Please try again...", _generalFont);

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

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