public Burn(Player affectedPlayer, Player Owner) : base(affectedPlayer, Owner) { liveTime = new Timer(5, false); dotDmg = 5; dotTime = new Timer(1, false); }
public Projectile(Ability ability, Debuff debuff) { spell = ability; db = debuff; activeEmitter = spell.Emitter != null; Start = spell.pClass.Position; End = new Vector2(InputHandler.EventX, InputHandler.EventY); Direction = End - Start; damage = ability.Damage; if (Direction != Vector2.Zero) Direction.Normalize(); liveTime = new Timer(spell.SpellRange, false); if (activeEmitter) { emitter = new LightEmitter(Main.lightEngine, Start, spell.LightRadius, 1); Main.lightEngine.plugEmitter(emitter); } angle = (float)System.Math.Atan2(Direction.Y, Direction.X); if (End == spell.pClass.Position) { spell.failedCast(); spell.projectileList.Remove(this); } spell.pClass.Drain(spell.Cost); }
public ParticlePreset(int burstCount, int minVel, int maxVel, Timer liveTime, float burstRadius) { this.burstCount = burstCount; this.minVel = minVel; this.maxVel = maxVel; this.liveTime = liveTime; this.burstRadius = burstRadius; }
public Particle(ParticleEngine engine, Vector2 startPos, ParticlePreset preset) { e = engine; settings = preset; pos = startPos; dir = PickRandomDirection(); vel = Main.random.Next(settings.minVel, settings.maxVel); liveTime = settings.liveTime; }
public Player(string Username, int TeamID) { if (Username.Length > 8 /* or allowed length */) // TODO: Make a checkname() method in server class { for (int i = 0; i < 8; i++) { Name += Username[i]; //Cap the username at 8 characters } } else { Name = Username; } Width = 60; Height = 100; ability = new List<Ability>(); debuffList = new List<Debuff>(); buffList = new List<Buff>(); Regen = new Timer(5, false); currentAni = new Animation(5); currentAni.buffer.Add(Main.Assets.getTexture(0)); Team = TeamID; Level = 1; Exp = 0; MoveSpeed = 1f; Health = 100; BaseHealth = 100; maxHealth = (BaseHealth * Level) + HealthStat; HP5 = 3; Mana = 100; BaseMana = 100; maxMana = (BaseMana * Level) + ManaStat; MP5 = 3; visionLayer = 0; defaultLayer = visionLayer; Bounds = new Rectangle((int)Position.X, (int)Position.Y, Width, Height); light = new LightEmitter(); nameplate = new Nameplate(this); autoAttack = new List<Autoattack>(); AttackSpeed = 0.5f; attackDelay = new Timer(AttackSpeed, false); }
public LightEngine(Main main, int width, int height) { m = main; for (int x = 0; x < width; x += 8) { for (int y = 0; y < height; y += 8) { shades.Add(new Shade(x, y)); } } lag = new Timer(5, true); }
public Autoattack(Vector2 startPos, Player player) { Start = startPos; plr = player; image = Main.Assets.getTexture(3); End = new Vector2((float)InputHandler.EventX, (float)InputHandler.EventY); timer = new Timer(Player.AttRange, false); // Create the live time of the projectile Direction = End - Start; angle = (float)System.Math.Atan2(Direction.Y, Direction.X); if (Direction != Vector2.Zero) Direction.Normalize(); }
public Fireball(Player player) : base(player) { pClass = player; Emitter = new LightEmitter(); LightRadius = 35f; Cost = 20 * pClass.Level; image = Main.Assets.getTexture(3); Damage = pClass.SpellPower + (10 * pClass.Level); Speed = 10f; SpellRange = 1f; cooldown = new Timer(60, false); }
public virtual void Cast(GameTime gameTime) { if (!onCooldown) { cooldown = new Timer(60, false); onCooldown = true; Selecting = false; pClass.canAttack = true; } }
public Burn() { liveTime = new Timer(5, false); dotDmg = 5; dotTime = new Timer(1, false); }