/* 文件名:MagicMissile.nut 路径:User/ObjectActScript/SkillObjectFunc/MagicMissile.nut 创建日期:2024-05-17 10:54 文件用途:魔法星弹Obj */ PassiveObjectFunction.PassiveObject_Create_23007 <- function(parent_obj) { SetAnimation(0); SetAttackinfo(0); SetName("魔法星弹"); } PassiveObjectFunction.PassiveObject_Proc_23007 <- function(dt) { // Util.PrintTable(AttackBox); // print(X); local MoveXValue = StateVar.MoveXRate * dt; local MoveYValue = StateVar.MoveYRate * dt; if (StateVar.Direction == DIRECTION.LEFT) MoveXValue = -MoveXValue; if (StateVar.Portrait == DIRECTION.UP) MoveYValue = -MoveYValue; MoveBy(MoveXValue, MoveYValue, 0); if (ExistingTime >= 2000) { DestroySelf(); } } PassiveObjectFunction.PassiveObject_Destroy_23007 <- function(parent_obj) { // print("我在场上"); // RemoveSelf(); } PassiveObjectFunction.PassiveObject_OnAttack_23007 <- function(Damager) { //处于不在同一个阵营时可以打击到 if (Damager.Team != Team && Attackinfo) { Attackinfo.Attack(this, Damager); DestroySelf(); } }