protected override void OnEmitted(uint Cur, uint Max) { var Pos = Position + OffsetAttr.Get(); var InitAttr = NpcManager.GenerateInitAttr(SpeedAttr.Get(), HpAttr.Get(), 0, 0, 0, DamageAttr.Get(), GemAttr.Get(), 30, 30); var Entity = NpcManager.AddNpc(Name, Pos, Team, 1, InitAttr); //Entity.MoveTo(Configure.CoreBasePosition); }
private void TestSkill() { PlayerManager.Master.Skill.AddNpcSkill(2001); PlayerManager.Master.Skill.AddNpcSkill(2002); PlayerManager.Master.Skill.AddNpcSkill(2003); PlayerManager.Master.Skill.AddNpcSkill(2004); PlayerManager.Master.Skill.AddNpcSkill(2005); PlayerManager.Master.Skill.AddNpcSkill(2006); PlayerManager.Master.Skill.AddNpcSkill(2007); PlayerManager.Master.Skill.AddNpcSkill(2012); PlayerManager.Master.Skill.AddPassiveSkill(3005, -1, true); NpcManager.AddNpc("boss", new Vector2(-Screen.width / 2.0f, 0), CombatTeam.B, 3, NpcManager.GenerateInitAttr(50, 1000, 10, 0, 0, 5, 1, 30, 30)); for (var Index = 0; Index < 10; ++Index) { var Npc = NpcManager.AddNpc($"Archer{Index + 1}", new Vector2(Screen.width / 2.0f - 100, Mathf.Lerp(-Screen.height / 2.0f + 50, Screen.height / 2.0f - 50, (float)Index / 9.0f)), CombatTeam.A, 2, NpcManager.GenerateInitAttr(200, 200, 0, 100, 10, 1, 0, 1500, 30)); Npc.Skill.AddNpcSkill(2011); // 箭雨-主动 } var Archer = NpcManager.AddNpc("Archer", new Vector2(Screen.width / 2 - 100, 0), CombatTeam.A, 1, NpcManager.GenerateInitAttr(200, 100, 0, 100, 10, 1, 0, 30, 30)); Archer.EnableAI(false); var UI = UIManager.OpenUI <JoystickUI>(); UI.BindMaster(Archer); }
protected override void OnEmitted(uint Cur, uint Max) { var Radius = RadiusAttr.Get(); var Angle = Random.Range(0, Mathf.PI * 2); var Pos = Position + new Vector2(Mathf.Sin(Angle) * Radius, Mathf.Cos(Angle) * Radius); var InitAttr = NpcManager.GenerateInitAttr(SpeedAttr.Get(), HpAttr.Get(), 0, 0, 0, DamageAttr.Get(), GemAttr.Get(), 30, 30); var Entity = NpcManager.AddNpc(Name, Pos, Team, 1, InitAttr); //Entity.MoveTo(Configure.CoreBasePosition); }
public override bool Execute(SkillArgs Args) { var Offset = MathHelper.RandVec2(100); var Npc = NpcManager.AddNpc(Args.Skill.Name, Configure.CoreBasePosition + Offset, CombatTeam.A, 2, NpcManager.GenerateInitAttr(200, 200, 0, 100, 10, 2, 0, 500, 30)); Npc.Skill.AddNpcSkill(2011); // 箭雨-主动 return(true); }
public override bool Execute(SkillArgs Args) { var Offset = MathHelper.RandVec2(100); var Npc = NpcManager.AddNpc(Args.Skill.Name, Configure.CoreBasePosition + Offset, CombatTeam.A, 2, NpcManager.GenerateInitAttr(200, 200, 0, 100, 10, 10, 0, 30, 30)); Npc.Skill.AddNpcSkill(2006); // 减速陷阱-主动 Npc.Skill.AddNpcSkill(2009); // 嘲讽-主动 Npc.Skill.AddNpcSkill(2010); // 分身-主动 Npc.Skill.AddPassiveSkill(3001, -1); // 荆棘-被动 return(true); }
public override bool Execute(SkillArgs Args) { var Master = Args.Master; if (Master == null) { return(false); } var Slave = NpcManager.AddNpc($"{Master.Name}_clone", Master.Position + MathHelper.RandVec2(100), Master.Team, Master.Scale.x, Master.Data.Attr.GetValues()); Slave.Actor.SetDirection(Master.Actor.Direction); return(true); }
void Start() { NpcManager.AddNpc(this); this.speed = UnityEngine.Random.Range(0.5f, 1.0f); }