コード例 #1
0
 public Character(Game game, string texture) : base(game)
 {
     IsBorn = false;
     IsDeadly = false;
     _texture = texture;
     _screenText = new ScreenText(Game);
     var graphicsDeviceService = Game.Services.GetService(typeof(IGraphicsDeviceService)) as IGraphicsDeviceService;
     _graphicsDevice = graphicsDeviceService.GraphicsDevice;
     _jumpSound = game.Content.Load<SoundEffect>("Sounds\\jump");
     CreateGameObject();
 }
コード例 #2
0
        public Character(Game game, string texture) : base(game)
        {
            IsBorn      = false;
            IsDeadly    = false;
            _texture    = texture;
            _screenText = new ScreenText(Game);
            var graphicsDeviceService = Game.Services.GetService(typeof(IGraphicsDeviceService)) as IGraphicsDeviceService;

            _graphicsDevice = graphicsDeviceService.GraphicsDevice;
            _jumpSound      = game.Content.Load <SoundEffect>("Sounds\\jump");
            CreateGameObject();
        }
コード例 #3
0
        public InformationPanel(Game game)
            : base(game)
        {
            _contentManager = game.Content;
            _timeText = new ScreenText(game);
            _timeText.SetPosition(1000, 50);

            _pointsText = new ScreenText(game);
            _pointsText.SetPosition(1000, 20);

            _contentManager = game.Content;
            CreateObject();
            Sprite.Position.X = 1100;
            Sprite.Position.Y = 50;
        }
コード例 #4
0
        public InformationPanel(Game game)
            : base(game)
        {
            _contentManager = game.Content;
            _timeText       = new ScreenText(game);
            _timeText.SetPosition(1000, 50);

            _pointsText = new ScreenText(game);
            _pointsText.SetPosition(1000, 20);

            _contentManager = game.Content;
            CreateObject();
            Sprite.Position.X = 1100;
            Sprite.Position.Y = 50;
        }
コード例 #5
0
        public GameOverScreen(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image)
            : base(game, spriteBatch)
        {
            _highScoreService = new PlexiIntegrationService();
            GetHighScoreFromLeaderBoard();
            IshighScore = false;
            _gameOverText = new BlinkText(spriteFont, 20);
            _gameOverText.SetPosition(555, 140);
            _gameOverText.SetSpacing(3);

            _pressSpaceToContinue = new BlinkText(spriteFont, 320);
            _pressSpaceToContinue.SetPosition(430, 670);

            _highScoreTableText = new ScreenText(game);
            _highScoreTableText.SetPosition(360, 250);

            _resultText = new ScreenText(game);
            _resultText.SetPosition(20, 130);

            _image = image;
            _imageRectangle = new Rectangle(0, 0, Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height);
        }