public static void CreateMainEmitter() { EmitterManager.RemoveEmitter(MainEmitter_); MainEmitter_ = EmitterManager.AddEmitter(new BulletCircleEmitter("MainBullet") { Master = PlayerManager.Master, Team = CombatTeam.A, TriggerCount = -1, EmittedCountAttr = new EmitterRandInt((int)GetBulletCount()), Interval = GetBulletInterval(), IsAlive = true, IsPause = false, Position = Configure.CoreTopPosition, RadiusAttr = new EmitterRandFloat(0), SpeedAttr = new EmitterRandFloat(1000, 2000), DamageAttr = new EmitterRandFloat(GetBulletDamage()), ResName = "Red", }) as BulletCircleEmitter; EventHelper.RemoveAllEvent(GameObject.Find("Touch").transform, true); EventHelper.AddEvent(GameObject.Find("Touch").transform, () => { var Target = FilterHelper.FindNearest(Master); if (Target != null) { var Desc = new TrackBulletDescriptor( new BaseBulletDescriptor("Touch", Configure.CoreTopPosition, CombatTeam.A, 5), "Blue", Target, 1500); BulletManager.AddTrackBullet(Desc); } }); }
public override bool Execute(SkillArgs Args) { var Target = FilterHelper.FindNearest(PlayerManager.Master); if (Target != null) { BulletManager.AddTrackBullet(new TrackBulletDescriptor( new BaseBulletDescriptor(Args.Skill.Name, Configure.CoreTopPosition, CombatTeam.A, 1), "Blue", Target, 1500)); return(true); } return(false); }