示例#1
0
        public void Add(Missile effect)
        {
            if (isFast)
            {
                return;
            }

            queue.Add(effect);
        }
示例#2
0
 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);
 }
示例#3
0
 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);
     }
 }
示例#4
0
 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);
 }
示例#5
0
 public void Remove(Missile effect)
 {
     queue.Remove(effect);
 }
示例#6
0
        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;
        }