27 public function __construct(
28 private int $networkId,
29 private ?ScriptDebugShapeType $type,
31 private ?
float $scale,
33 private ?
float $totalTimeLeft,
34 private ?
Color $color,
35 private ?
string $text,
37 private ?
Vector3 $lineEndLocation,
38 private ?
float $arrowHeadLength,
39 private ?
float $arrowHeadRadius,
40 private ?
int $segments,
43 public static function remove(
int $networkId) :
self{
44 return new self($networkId,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null);
47 public static function line(
int $networkId,
Vector3 $location,
Vector3 $lineEndLocation, ?
Color $color =
null) :
self{
49 networkId: $networkId,
50 type: ScriptDebugShapeType::LINE,
58 lineEndLocation: $lineEndLocation,
59 arrowHeadLength:
null,
60 arrowHeadRadius:
null,
65 public static function box(
int $networkId,
Vector3 $location,
Vector3 $boxBound, ?
float $scale =
null, ?
Color $color =
null) :
self{
67 networkId: $networkId,
68 type: ScriptDebugShapeType::BOX,
76 lineEndLocation:
null,
77 arrowHeadLength:
null,
78 arrowHeadRadius:
null,
83 public static function sphere(
int $networkId,
Vector3 $location, ?
float $scale =
null, ?
Color $color =
null, ?
int $segments =
null) :
self{
85 networkId: $networkId,
86 type: ScriptDebugShapeType::SPHERE,
94 lineEndLocation:
null,
95 arrowHeadLength:
null,
96 arrowHeadRadius:
null,
101 public static function circle(
int $networkId,
Vector3 $location, ?
float $scale =
null, ?
Color $color =
null, ?
int $segments =
null) :
self{
103 networkId: $networkId,
104 type: ScriptDebugShapeType::CIRCLE,
112 lineEndLocation:
null,
113 arrowHeadLength:
null,
114 arrowHeadRadius:
null,
119 public static function text(
int $networkId,
Vector3 $location,
string $text, ?
Color $color =
null) :
self{
121 networkId: $networkId,
122 type: ScriptDebugShapeType::TEXT,
130 lineEndLocation:
null,
131 arrowHeadLength:
null,
132 arrowHeadRadius:
null,
137 public static function arrow(
int $networkId,
Vector3 $location,
Vector3 $lineEndLocation, ?
float $scale =
null, ?
Color $color =
null, ?
float $arrowHeadLength =
null, ?
float $arrowHeadRadius =
null, ?
int $segments =
null) :
self{
139 networkId: $networkId,
140 type: ScriptDebugShapeType::ARROW,
148 lineEndLocation: $lineEndLocation,
149 arrowHeadLength: $arrowHeadLength,
150 arrowHeadRadius: $arrowHeadRadius,
155 public function getNetworkId() :
int{
return $this->networkId; }
157 public function getType() : ?ScriptDebugShapeType{
return $this->type; }
159 public function getLocation() : ?
Vector3{
return $this->location; }
161 public function getScale() : ?
float{
return $this->scale; }
163 public function getRotation() : ?
Vector3{
return $this->rotation; }
165 public function getTotalTimeLeft() : ?
float{
return $this->totalTimeLeft; }
167 public function getColor() : ?
Color{
return $this->color; }
169 public function getText() : ?
string{
return $this->text; }
171 public function getBoxBound() : ?
Vector3{
return $this->boxBound; }
173 public function getLineEndLocation() : ?
Vector3{
return $this->lineEndLocation; }
175 public function getArrowHeadLength() : ?
float{
return $this->arrowHeadLength; }
177 public function getArrowHeadRadius() : ?
float{
return $this->arrowHeadRadius; }
179 public function getSegments() : ?
int{
return $this->segments; }
215 $out->
writeOptional($this->type, fn(ScriptDebugShapeType $type) => $out->putByte($type->value));
219 $out->
writeOptional($this->totalTimeLeft, $out->putLFloat(...));
224 $out->
writeOptional($this->arrowHeadLength, $out->putLFloat(...));
225 $out->
writeOptional($this->arrowHeadRadius, $out->putLFloat(...));