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 BaseWave(uint Wave) : base($"Wave{Wave}") { this.Wave = Wave; Data = LocalData.WaveList[Wave]; Emitter_ = EmitterManager.AddEmitter(new NpcRectEmitter(Name) { Team = CombatTeam.B, TriggerCount = -1, //Data.TriggerCount, EmittedCountAttr = new EmitterRandInt(1, 5), //Data.EmitterCount, Interval = 1f, //Data.Interval, IsAlive = true, IsPause = false, Position = new Vector2(Configure.WindowLeft + 120, 0), SpeedAttr = new EmitterRandFloat(Data.Speed * 0.8f, Data.Speed * 1.2f), HpAttr = new EmitterRandFloat(Data.Hp), DamageAttr = new EmitterRandFloat(Data.Damage), GemAttr = new EmitterRandInt(Data.Gem), OffsetAttr = new EmitterRandVector2( new Vector2(-100, -Configure.WindowHeight / 2 + 100), new Vector2(100, Configure.WindowHeight / 2 - 100)), }); Emitter_.OnTrigger += (Count) => RemainingCount_ += Count; //Emitter_.AtOnce(); EventManager.Register <NpcDieEvent>(OnNpcDieEvent); }
public override bool Execute(SkillArgs Args) { EmitterManager.AddEmitter(new NpcCircleEmitter(Args.Skill.Name) { Team = CombatTeam.B, TriggerCount = 1, EmittedCountAttr = new EmitterRandInt(100), Interval = 1.0f / 60.0f, IsAlive = true, IsPause = false, Position = new Vector2(Configure.WindowLeft + 200, 0), RadiusAttr = new EmitterRandFloat(10, 200), SpeedAttr = new EmitterRandFloat(80, 180), HpAttr = new EmitterRandFloat(1, 5), DamageAttr = new EmitterRandFloat(1, 1), GemAttr = new EmitterRandInt(1, 1), }); return(true); }
public override bool Execute(SkillArgs Args) { EmitterManager.AddEmitter(new BulletCircleEmitter(Args.Skill.Name) { Master = PlayerManager.Master, Team = CombatTeam.A, TriggerCount = 10, EmittedCountAttr = new EmitterRandInt(100), Interval = 30.0f / 60.0f, IsAlive = true, IsPause = false, Position = Configure.CoreTopPosition, RadiusAttr = new EmitterRandFloat(0, 0), SpeedAttr = new EmitterRandFloat(1000, 2000), DamageAttr = new EmitterRandFloat(3, 5), ResName = "Blue", }); return(true); }