Esempio n. 1
0
 public Enemy(ContentManager content, Vector2 position, Level level)
     : base(content)
 {
     _level = level;
     Position = position;
     ChargeRate = -0.2f;
     Alive = true;
     //_content = content;
     //Texture = content.Load<Texture2D>("Player");
     //Dictionary<string, Rectangle> spriteMap = content.Load<Dictionary<string, Rectangle>>("PlayerSpriteMap");
     //animation = new Animation(Texture, spriteMap);
     //animationPlayer.PlayAnimation(animation, "PlayerForward", 0.3f, true);
 }
Esempio n. 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            _gameState = new GameState();
            _gameState = GameState.GamePlay;
            _player = new Player(Content);
            _currentLevel = new Level(Content, _player);

            base.Initialize();
        }