public void CheckSpellEffect(bool isLeft, LiveMonster target, Point mouse) { if (spellInfo.SpellConfig.Effect != null) { Player p1 = isLeft ? BattleManager.Instance.PlayerManager.LeftPlayer : BattleManager.Instance.PlayerManager.RightPlayer; Player p2 = !isLeft ? BattleManager.Instance.PlayerManager.LeftPlayer : BattleManager.Instance.PlayerManager.RightPlayer; spellInfo.SpellConfig.Effect(spellInfo, BattleManager.Instance.MemMap, p1, p2, target, mouse, Level); if (!string.IsNullOrEmpty(spellInfo.SpellConfig.AreaEffect)) { //播放特效 RegionTypes rt = BattleTargetManager.GetRegionType(spellInfo.SpellConfig.Target[2]); var cardSize = BattleManager.Instance.MemMap.CardSize; foreach (var memMapPoint in BattleManager.Instance.MemMap.Cells) { var pointData = memMapPoint.ToPoint(); if (BattleLocationManager.IsPointInRegionType(rt, mouse.X, mouse.Y, pointData, spellInfo.SpellConfig.Range, isLeft)) { var effectData = new ActiveEffect(EffectBook.GetEffect(spellInfo.SpellConfig.AreaEffect), pointData + new Size(cardSize / 2, cardSize / 2), false); BattleManager.Instance.EffectQueue.Add(effectData); } } } } }
public void CheckCover() { string cover = liveMonster.Avatar.MonsterConfig.Cover; if (!string.IsNullOrEmpty(cover)) { ActiveEffect ef = new ActiveEffect(EffectBook.GetEffect(cover), liveMonster, true); ef.Repeat = true; BattleManager.Instance.EffectQueue.Add(ef); coverEffectList.Add(ef); } liveMonster.SkillManager.CheckCover(coverEffectList); }
public void CheckCover(List<ActiveEffect> coverEffectList) { foreach (MemBaseSkill memBaseSkill in Skills)//技能造成的特效 { if (memBaseSkill.SkillConfig.Cover != "") { ActiveEffect ef = new ActiveEffect(EffectBook.GetEffect(memBaseSkill.SkillConfig.Cover), self, true); ef.Repeat = true; BattleManager.Instance.EffectQueue.Add(ef); coverEffectList.Add(ef); } } }
private void SendAreaEffect(Point pos) { //播放特效 RegionTypes rt = BattleTargetManager.GetRegionType(SkillInfo.SkillConfig.Target[2]); var cardSize = BattleManager.Instance.MemMap.CardSize; foreach (var memMapPoint in BattleManager.Instance.MemMap.Cells) { var pointData = memMapPoint.ToPoint(); if (BattleLocationManager.IsPointInRegionType(rt, pos.X, pos.Y, pointData, SkillInfo.SkillConfig.Range, Self.IsLeft)) { var effectData = new ActiveEffect(EffectBook.GetEffect(SkillInfo.SkillConfig.EffectArea), pointData + new Size(cardSize / 2, cardSize / 2), false); BattleManager.Instance.EffectQueue.Add(effectData); } } }