public Player MultiToPlayer(GameScreen game, Texture2D text) { Player player = new Player(game,text); player.Life = Life; player.Power = Power; player.Position = Position; player.Direction = Direction; return player; }
private const int LifeBarSize = 100; // Taille de la bar de Vie du Monstre #endregion Fields #region Constructors // Constructeur avec pour paramètres les mêmes que sa classe père public Monster(GameScreen game, Texture2D texture, int vertical, int horizontale) : base(game) { InitTexture(texture, horizontale, vertical); Speed = 1.0f; xp = 100; Life = 100; LifeMax = 100; }
public WorldEffect(GameScreen game, Texture2D effect, Entity entity, Vector2 delta, int lifeSpan, int frameX, int frameY) { this.effect = effect; LifeSpan = lifeSpan; InitEffect(effect, frameX, frameY); BindTo(entity, delta); Game = game; Game.WorldEffects.Add(this); }
public Monster(GameScreen game, Texture2D texture, int horizontal, int vertical) : base(game) { InitTexture(texture, horizontal, vertical); Speed = 1.0f; MovingScope = 500; VisionSight = 200; xp = 100; Life = 100; LifeMax = 100; VisionSight = 200; ia = new Ia(game.MapFirst.Data, this); }
public Player(GameScreen game, Texture2D texture) : base(game) { Stats = new PlayerStats(); Position = new Vector2(480, 336); InitTexture(texture, 3, 4); Speed = 3.0f; Power = 100.0; // Mana Life = 100.0; // Vie Stats.LifeMax = 100; Stats.PowerMax = 100; Stats.Strength = 10; Stats.Dexterity = 10; Stats.Intelligence = 10; Stats.LifeRegeneration = 1.0; Stats.PowerRegenaration = 1.0; Stats.AmountKilled = 0; ExperienceNeeded = 100; Level = 1; experience = 0; // caracPoint = 0; CanMove = true; spells = new List<Spell> // Liste des sorts { new Basic(this), new SpeedUp(this), new AstralMove(this), new MegaBlast(this), new UberBlast(this) }; Vector2 delta = new Vector2(TexturesManager.PowerBar.Width / 10.0f, 0); spellsRect = new Rectangle[spells.Count]; for (int i = 0; i < spells.Count; i++) { spellsRect[i] = new Rectangle((int)(MainGame.ScreenX / 2 - TexturesManager.PowerBar.Width / 2 + 5 + delta.X * i), (int)(MainGame.ScreenY - TexturesManager.PowerBar.Height + 5 + delta.Y * i), spells[i].Icon.Width, spells[i].Icon.Height); } }
protected Entity(GameScreen game) { Game = game; Position = new Vector2(RandomManager.Next(100, 200), RandomManager.Next(100, 200)); // Juste pour les tests }