public IceShieldBuff(Being being, TimeSpan length) : base(null, being, length, true) { Texture = TextureCacheFactory.Get("Buffs/ice-shield.png"); GrantsInvulnerability = true; Animation = new Animation(""); Animation.AddFrame(Texture.Bounds, TimeSpan.FromSeconds(0.15)); }
public SprintBuff(Being being, float bonus) : base(null, being, TimeSpan.MaxValue, true, movementSpeedFactor: bonus) { Texture = TextureCacheFactory.Get("Buffs/dash.png"); Animation = new Animation("sprint"); Animation.AddFrame(new Rectangle(0, 0, TextureSize, TextureSize), TimeSpan.FromSeconds(0.15)); Animation.AddFrame(new Rectangle(TextureSize, 0, TextureSize, TextureSize), TimeSpan.FromSeconds(0.15)); Animation.AddFrame(new Rectangle(TextureSize * 2, 0, TextureSize, TextureSize), TimeSpan.FromSeconds(0.15)); Animation.AddFrame(new Rectangle(TextureSize * 3, 0, TextureSize, TextureSize), TimeSpan.FromSeconds(0.15)); }
public BlazingSpeedBuff(Zerd zerd, TimeSpan length, float speedIncrease) : base(null, zerd, length, true, movementSpeedFactor: speedIncrease) { Applier = zerd; DamageType = DamageTypes.Fire; Texture = TextureCacheFactory.Get("Buffs/burn.png"); Animation = new Animation(""); Animation.AddFrame(Texture.Bounds, TimeSpan.FromSeconds(0.15)); if (zerd.SkillPoints(SkillType.BlazingSpeed) > 0) { DamagePerSecond = zerd.MaxHealth * PlayerSkills.BleedFireHealthPercent / (100 * (float)length.TotalSeconds); } }
/// <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() { Globals.SpriteDrawer = new SpriteBatch(GraphicsDevice); Globals.Initialize(); TextureCacheFactory.Initialize(GraphicsDevice); InputService.Initialize(); SkillConstants.Initialize(); XmlStorage.Initialize(); TextureCacheFactory.Get("Entities/Zomb-King.png"); Level.GameOverFunc = GameOverFunc; Globals.Map = new Map(GraphicsDevice, MapTypes.Dungeon, Globals.ViewportBounds); _mainMenu = new MainMenu(SetupGameFunc); _background = new MainBackground(); base.Initialize(); }
public BurnBuff(Being creator, Being being, TimeSpan length, float burnDamage, AbilityTypes abilityType) : base(creator, being, length, true, damagePerSecond: burnDamage) { Texture = TextureCacheFactory.Get("Buffs/burn.png"); Animation = new Animation(""); Animation.AddFrame(Texture.Bounds, TimeSpan.FromSeconds(0.15)); var zerd = creator as Zerd; if (zerd == null) { return; } DamagePerSecond *= zerd.SkillValue(SkillType.DeepBurn, true); Length = TimeSpan.FromMilliseconds(TimeRemaining.TotalMilliseconds * zerd.SkillValue(SkillType.DeepBurn, true)); TimeRemaining = Length; AbilityType = abilityType; DamageType = DamageTypes.Fire; }
public FrozenBuff(Being being, TimeSpan length) : base(null, being, length, true, frozen: true) { Texture = TextureCacheFactory.Get("Buffs/cold.png"); Animation = new Animation(""); Animation.AddFrame(Texture.Bounds, TimeSpan.FromSeconds(0.15)); }
protected Entity(string file, bool cache) { Texture = string.IsNullOrWhiteSpace(file) ? null : cache?TextureCacheFactory.Get(file) : TextureCacheFactory.GetOnce(file); IsActive = true; }
public CharmBuff(Being creator, Being being) : base(creator, being, TimeSpan.MaxValue, true, damagePerSecond: AbilityConstants.CharmDegeneration) { Texture = TextureCacheFactory.Get("Buffs/charm.png"); Animation = new Animation(""); Animation.AddFrame(Texture.Bounds, TimeSpan.FromSeconds(0.15)); }
public ColdBuff(Being being, TimeSpan length, float factor) : base(null, being, length, true, movementSpeedFactor: factor) { Texture = TextureCacheFactory.Get("Buffs/cold.png"); Animation = new Animation(""); Animation.AddFrame(Texture.Bounds, TimeSpan.FromSeconds(0.15)); }