/** 执行特殊移动 */ private void toSpecialMove(int id, int[] args, bool isInitiative, bool isNewOne) { clearBaseMove(); _d.baseMoveState = UnitBaseMoveState.SpecialMove; _currentMoveIsInitiative = isInitiative; _specialMoveConfig = SpecialMoveConfig.get(_d.specialMoveID = id); _specialMoveType = _specialMoveConfig.type; _d.specialMoveArgs = args; //TODO:补充特殊移动 if (!_unit.isDriveAll() && isInitiative) { CUnitSpecialMoveRequest.create(_unit.instanceID, id, _unit.pos.getPosDir(), args).send(); } //全自己驱动 if (_unit.isDriveAll() && UnitSpecialMoveTypeConfig.get(_specialMoveType).withVertigo) { _unit.fight.getStatusLogic().addStatus(StatusType.Vertigo); } _unit.show.playMotion(_specialMoveConfig.motionID, false); toExecuteSpecialMove(isNewOne); }
/** 基元移动清回 */ private void clearBaseMove() { if (_d.baseMoveState == UnitBaseMoveState.None) { return; } switch (_d.baseMoveState) { case UnitBaseMoveState.MoveToDir: { _d.realMoveDir = null; _d.realMoveSpeedRatio = -1; } break; case UnitBaseMoveState.MoveToPos: { _d.baseMovePos = null; _moveLastTimeMillis = 0f; _calculateMoveSpeedVectorFrameCount = 0; } break; case UnitBaseMoveState.SpecialMove: { if (_unit.isDriveAll() && UnitSpecialMoveTypeConfig.get(_specialMoveType).withVertigo) { _unit.fight.getStatusLogic().subStatus(StatusType.Vertigo); } _d.specialMoveID = -1; _d.specialMoveArgs = null; _d.specialMoveLastTime = 0; _specialMoveConfig = null; _specialMoveType = -1; _calculateMoveSpeedVectorFrameCount = 0; } break; case UnitBaseMoveState.Drive: { _d.driveData = null; } break; } _d.baseMoveState = UnitBaseMoveState.None; }