23 public const NETWORK_ID = ProtocolInfo::CAMERA_AIM_ASSIST_PACKET;
26 private float $distance;
27 private CameraAimAssistTargetMode $targetMode;
28 private CameraAimAssistActionType $actionType;
33 public static function create(
Vector2 $viewAngle,
float $distance, CameraAimAssistTargetMode $targetMode, CameraAimAssistActionType $actionType) : self{
35 $result->viewAngle = $viewAngle;
36 $result->distance = $distance;
37 $result->targetMode = $targetMode;
38 $result->actionType = $actionType;
42 public function getViewAngle() :
Vector2{ return $this->viewAngle; }
44 public function getDistance() : float{ return $this->distance; }
46 public function getTargetMode() : CameraAimAssistTargetMode{ return $this->targetMode; }
48 public function getActionType() : CameraAimAssistActionType{ return $this->actionType; }
51 $this->viewAngle = $in->getVector2();
53 $this->targetMode = CameraAimAssistTargetMode::fromPacket($in->
getByte());
54 $this->actionType = CameraAimAssistActionType::fromPacket($in->
getByte());
58 $out->putVector2($this->viewAngle);
59 $out->putLFloat($this->distance);
60 $out->putByte($this->targetMode->value);
61 $out->putByte($this->actionType->value);
65 return $handler->handleCameraAimAssist($this);