public override void LoadContent()
        {
            _spriteAnimation1 = new SpriteAnimation(ScreenManager.Content.Load<Texture2D>("Sprites\\Ifrit\\ifrit"), new StreamReader(@"Content/Sprites/Ifrit/ifrit.txt"));
            _spriteAnimation1.Animation = "ifrit_d_attack";

            _spriteAnimation2 = new SpriteAnimation(ScreenManager.Content.Load<Texture2D>("Sprites\\Ifrit\\ifrit"), new StreamReader(@"Content/Sprites/Ifrit/ifrit.txt"));
            _spriteAnimation2.Animation = "ifrit_d_attack";
            //BasicBody bb1 = null; //new BasicBody(_creature, _creature.Position, 20);
            //BasicBody bb2 = new BasicBody(_creature, _creature.Position, 20);
            _player = new Player(_spriteAnimation1, Vector2.Zero);
            _creature = new Enemy(_spriteAnimation2, _player, new Vector2(50,50));
            base.LoadContent();
        }
Beispiel #2
0
 public Player(SpriteAnimation animation, Vector2 position)
 {
     this.body = new BasicBody(this, position, 1f);
     this.intelligence = new PlayerIntelligence(this, 10f);
     this.spriteManager = animation;
 }
Beispiel #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            //Don't know how to do file paths with C#..
            ifrit = new SpriteAnimation(Content.Load<Texture2D>("Sprites\\Ifrit\\ifrit"), new StreamReader(@"Content/Sprites/Ifrit/ifrit.txt"));

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //        Farseer.Instance.DebugView.LoadContent(GraphicsDevice, this.Content);
            generator.Generate(Farseer.Instance.World);
            // TODO: use this.Content to load your game content here
        }