//处理动作第一帧要做的事 public static void HandlerFirstActionFrame(MeteorUnit owner, int Action) { if (FirstEvents == null) { FirstEvents = new List <int>() { (int)FrameEvent.ChangeWeaponPos2, (int)FrameEvent.ChangeWeaponPos3, (int)FrameEvent.ChangeWeaponPos5, (int)FrameEvent.ChangeWeaponPos4, (int)FrameEvent.ChangeWeaponPos449_0, (int)FrameEvent.ChangeWeaponPos450_0, (int)FrameEvent.ChangeWeaponPos6, (int)FrameEvent.ChangeWeaponPose570_0, (int)FrameEvent.ChangeWeaponPos7 } } ; if (!FirstEvents.Contains(Action)) { return; } switch ((FrameEvent)Action) { case FrameEvent.ChangeWeaponPos7: owner.ChangeWeaponPos(2); break; case FrameEvent.ChangeWeaponPos6: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPos2: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPos3: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPos5: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPos449_0: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPos450_0: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPos4: owner.ChangeWeaponPos(0); break; case FrameEvent.ChangeWeaponPose570_0: owner.ChangeWeaponPos(0); break; } }
//部分动作事件 public static void HandlerPoseAction(MeteorUnit owner, int action) { switch (action) { case (int)FrameEvent.ChangeWeaponPos7: //收刀切换为居合最后一帧 case (int)FrameEvent.ChangeWeaponPos8: //收刀切换为居合 owner.ChangeWeaponPos(WeaponPos.PosB); break; } }
//处理动作最后一帧要做的事 public static void HandlerFinalActionFrame(MeteorUnit owner, int Action) { if (LastEvents == null) { LastEvents = new List <int>() { (int)FrameEvent.ChangeWeapon0, (int)FrameEvent.ChangeWeapon1, (int)FrameEvent.ChangeWeaponPos0, (int)FrameEvent.ChangeWeaponPos5, (int)FrameEvent.ChangeWeaponPose570_0, (int)FrameEvent.ChangeWeaponPose451_0, (int)FrameEvent.ChangeWeaponPos7, (int)FrameEvent.RebornFriend }; } if (!LastEvents.Contains(Action)) { return; } switch ((FrameEvent)Action) { case FrameEvent.ChangeWeaponPos7: //收刀切换为居合最后一帧 owner.ChangeWeaponPos(WeaponPos.PosB); break; //0拔刀1长枪2居合 case FrameEvent.ChangeWeaponPos0: owner.ChangeWeaponPos(WeaponPos.PosA); //owner.ChangeWeaponPos(2); break; //case FrameEvent.ChangeWeaponPos2: // owner.ChangeWeaponPos(0); // break; //case FrameEvent.ChangeWeaponPos3: // owner.ChangeWeaponPos(2); // break; case FrameEvent.ChangeWeaponPos8: owner.ChangeWeaponPos(WeaponPos.PosB); break; case FrameEvent.ChangeWeaponPos5: owner.ChangeWeaponPos(WeaponPos.PosA); break; case FrameEvent.ChangeWeapon0: //左打虎 case FrameEvent.ChangeWeapon1: //右打虎 owner.ChangeNextWeapon(); break; case FrameEvent.ChangeWeaponPose570_0: owner.ChangeWeaponPos(WeaponPos.PosA); break; case FrameEvent.ChangeWeaponPose451_0: owner.ChangeWeaponPos(WeaponPos.Pos); break; case FrameEvent.RebornFriend: owner.RebornFriend(); break; } }
//处理动作最后一帧要做的事 public static void HandlerFinalActionFrame(MeteorUnit owner, int Action) { if (LastEvents == null) { LastEvents = new List <int>() { (int)FrameEvent.ChangeWeapon0, (int)FrameEvent.ChangeWeapon1, (int)FrameEvent.ChangeWeaponPos0, (int)FrameEvent.ChangeWeaponPos1, (int)FrameEvent.ChangeWeaponPos5, (int)FrameEvent.ChangeWeaponPose570_0, (int)FrameEvent.ChangeWeaponPose456_0, (int)FrameEvent.ChangeWeaponPose451_0 }; } if (!LastEvents.Contains(Action)) { return; } switch ((FrameEvent)Action) { //0拔刀1长枪2居合 case FrameEvent.ChangeWeaponPos0: owner.ChangeWeaponPos(1); //owner.ChangeWeaponPos(2); break; case FrameEvent.ChangeWeaponPos1: owner.ChangeWeaponPos(2); break; //case FrameEvent.ChangeWeaponPos2: // owner.ChangeWeaponPos(0); // break; //case FrameEvent.ChangeWeaponPos3: // owner.ChangeWeaponPos(2); // break; case FrameEvent.ChangeWeaponPose456_0: owner.ChangeWeaponPos(2); break; case FrameEvent.ChangeWeaponPos5: owner.ChangeWeaponPos(1); break; case FrameEvent.ChangeWeapon0: //左打虎 case FrameEvent.ChangeWeapon1: //右打虎 owner.ChangeNextWeapon(); break; case FrameEvent.ChangeWeaponPose570_0: owner.ChangeWeaponPos(1); break; case FrameEvent.ChangeWeaponPose451_0: owner.ChangeWeaponPos(0); break; } }