public void Add(Missile effect) { if (isFast) { return; } queue.Add(effect); }
public void AddMissile(IMonster target, string arrow) { BasicMissileControler controler = new TraceMissileControler(this, target as LiveMonster); Missile mi = new Missile(arrow, Position.X, Position.Y, controler); BattleManager.Instance.MissileQueue.Add(mi); }
public void AddSpellRowMissile(ISpell spell, int count, Point mouse, string effect) { int size = BattleManager.Instance.MemMap.CardSize; int ybase = mouse.Y/size*size; int xstart = IsLeft ? 0 : BattleManager.Instance.MemMap.StageWidth - size; for (int i = -count/2; i <= count/2; i++) { int yoff = ybase + i*size; int xend = IsLeft ? xstart + spell.Range / 10 * size : xstart - spell.Range / 10 * size; BasicMissileControler controler = new SpellLandMissileControler(this, new Point(xend, yoff), spell); Missile mi = new Missile(effect, xstart, yoff, controler); BattleManager.Instance.MissileQueue.Add(mi); } }
public void AddSpellMissile(IMonster target, ISpell spell, Point mouse, string effect) { BasicMissileControler controler = new SpellTraceMissileControler((LiveMonster)target, spell); Missile mi = new Missile(effect, mouse.X, mouse.Y, controler); BattleManager.Instance.MissileQueue.Add(mi); }
public void Remove(Missile effect) { queue.Remove(effect); }
private void CheckFight(LiveMonster nearestEnemy) { if (monster.RealRange <= GameConstants.MaxMeleeAtkRange) { monster.HitTarget(nearestEnemy, true); //近战 BattleManager.Instance.EffectQueue.Add(new ActiveEffect(EffectBook.GetEffect(monster.Arrow), nearestEnemy, false)); } else { BasicMissileControler controler = new TraceMissileControler(monster, nearestEnemy); Missile mi = new Missile(monster.Arrow, monster.Position.X, monster.Position.Y, controler); BattleManager.Instance.MissileQueue.Add(mi); } if (monster.RealSpd != 0) //会返回一些ats { monster.AddActionRate((float) (monster.RealSpd)*GameConstants.SpdToRate/100); } monster.MovRound = 0; }