static void SkillMove(Character cha, ChildObject childObj, SkillContext context, excel_skill_event e) { if (cha == null) { return; } SkillMoveDataType type = (SkillMoveDataType)e.evnetParam1; if (type == SkillMoveDataType.MoveType1) { float time = (float)e.evnetParam2 * 0.001f; SkillMove skillMove = IAction.CreateAction <SkillMove>(); skillMove.Init1(cha, context.TargetPos, time); cha.AddAction(skillMove); } else if (type == SkillMoveDataType.MoveType2) { float time = (float)e.evnetParam2 * 0.001f; float speed = (float)e.evnetParam3 * 0.001f; Vector3 dir = context.TargetPos - cha.Position; SkillMove skillMove = IAction.CreateAction <SkillMove>(); skillMove.Init2(cha, dir, speed, time); cha.AddAction(skillMove); } context.SetSkillContextFlag(SkillContextFlag.SyncPosOnSkillEnd, true); }