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); }
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; }