Пример #1
0
 public Mob(Rectangle winSize, int seed, Vector2 position, int width, int height, string assetName, int textureColumns, int textureLines, Vector2 speed, Vector2 mapSpeed, int attackSpeed, int attackDistance, Rectangle playingZone)
     : base(winSize, position, width, height, assetName, textureColumns, textureLines)
 {
     _ia = new IA(winSize, seed, speed, attackDistance, 300, attackSpeed);
     this._playingZone = playingZone;
     this._mapSpeed = mapSpeed;
     _speed = speed;
     Life = 1;
     _lifeSprite = new Sprite(new Rectangle(_sprite.Position.X, _sprite.Position.Y - (int)((1f / 30f) * (float)_sprite.Position.Height), _sprite.Position.Width, (int)((1f / 30f) * (float)_sprite.Position.Height)), _windowSize, "game/life_mob");
 }
Пример #2
0
 public Mob(Rectangle winSize, int seed, Vector2 position, int width, int height, string assetName, int textureColumns, int textureLines, Vector2 speed, Vector2 mapSpeed, int attackSpeed, int attackDistance, Rectangle playingZone)
     : base(winSize, position, width, height, assetName, textureColumns, textureLines)
 {
     this._ia = new IA(winSize, seed, speed, attackDistance, 300, attackSpeed);
     this._playingZone = playingZone;
     this._mapSpeed = mapSpeed;
     this._speed = speed;
     GivenExp = 50;
     this.Life = 1f;
     this._lifeSprite = new Sprite(new Rectangle(this.Sprite.Position.X, this.Sprite.Position.Y - (int)(0.0333333350718021 * (double)this.Sprite.Position.Height), this.Sprite.Position.Width, (int)(0.0333333350718021 * (double)this.Sprite.Position.Height)), this._windowSize, "game/life_mob");
     this.AddAttack(CharacterActions.Attack1Right, new Attack(this._windowSize, new AnimatedSprite(new Rectangle(0, 0, 10, 10), this._windowSize, "general/vide", 1, 1, 30, 1, -1, -1, false), 50, 0.005f, 50, 500, 0.05f));
     this.AddAttack(CharacterActions.Attack1Left, new Attack(this._windowSize, new AnimatedSprite(new Rectangle(0, 0, 10, 10), this._windowSize, "general/vide", 1, 1, 30, 1, -1, -1, false), 50, 0.005f, 50, 500, 0.05f));
 }