Пример #1
0
 public Sword(Texture2D textureImage, Vector2 position, Point frameSize,
     Point currentFrame, Point sheetSize, float angle, int tipDamage, int midDamage, float depth, SpriteManager spriteManager)
     : base(textureImage, position, frameSize, currentFrame, sheetSize, angle, depth)
 {
     this.spriteManager = spriteManager;
     this.midDamage = midDamage;
     this.tipDamage = tipDamage;
 }
Пример #2
0
 public Player(Texture2D textureImage, Vector2 position, Point frameSize,
     Point currentFrame, Point sheetSize, float angle, int totalhp, int hp,
     int xp, int xpToNextLevel, float depth, SpriteManager spriteManager, MapManager mapManager)
     : base(textureImage, position, frameSize, currentFrame, sheetSize, angle, depth)
 {
     this.totalhp = totalhp;
     this.hp = hp;
     this.xp = xp;
     this.xpToNextLevel = xpToNextLevel;
     this.spriteManager = spriteManager;
     this.mapManager = mapManager;
 }
Пример #3
0
 public Enemy(Texture2D textureImage, Vector2 position, Point frameSize,
     Point currentFrame, Point sheetSize, float angle, float depth, SpriteManager spriteManager, int weight,
     Vector2 speed, int totalhp, int hp, int attackSpeed, int attackRange, int damage, int xp)
     : base(textureImage, position, frameSize, currentFrame, sheetSize, speed, angle, depth)
 {
     this.spriteManager = spriteManager;
     this.totalhp = totalhp;
     this.hp = hp;
     this.attackSpeed = attackSpeed;
     this.attackRange = attackRange;
     this.damage = damage;
     this.xp = xp;
     this.weight = weight;
 }
Пример #4
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

            spriteManager = new SpriteManager(this);
            menuManager = new MenuManager(this);
            mapManager = new MapManager(this);

            Components.Add(mapManager);
            Components.Add(spriteManager);
            Components.Add(menuManager);
            rectangle.Right.Equals(rectangle.Left);

            base.Initialize();
        }