
.. py:class:: pystk2.WorldState

   .. py:class:: Phase

      .. py:attribute:: DELAY_FINISH_PHASE
         :annotation: = 9

      .. py:attribute:: FINISH_PHASE
         :annotation: = 11

      .. py:attribute:: GO_PHASE
         :annotation: = 6

      .. py:attribute:: IN_GAME_MENU_PHASE
         :annotation: = 12

      .. py:attribute:: MUSIC_PHASE
         :annotation: = 7

      .. py:attribute:: RACE_PHASE
         :annotation: = 8

      .. py:attribute:: READY_PHASE
         :annotation: = 4

      .. py:attribute:: RESULT_DISPLAY_PHASE
         :annotation: = 10

      .. py:attribute:: SERVER_READY_PHASE
         :annotation: = 3

      .. py:attribute:: SETUP_PHASE
         :annotation: = 1

      .. py:attribute:: SET_PHASE
         :annotation: = 5

      .. py:attribute:: TRACK_INTRO_PHASE
         :annotation: = 0

      .. py:attribute:: UNDEFINED_PHASE
         :annotation: = 13

      .. py:attribute:: WAIT_FOR_SERVER_PHASE
         :annotation: = 2

      .. py:property:: name () -> str
         :annotation: property

      .. py:property:: value () -> int
         :annotation: property

   .. py:method:: set_kart_location (kart_id: SupportsInt, position: float3, rotation: Quaternion = [0.0, 0.0, 0.0, 1.0], speed: SupportsFloat = 0) -> None
      :staticmethod:

      Move a kart to a specific location.


   .. py:method:: update (self: pystk2.WorldState) -> None

      Update this object with the current world state


   .. py:property:: aux_ticks () -> int
      :annotation: property

      Ticks since ready


   .. py:property:: ffa () -> pystk2.FFA
      :annotation: property

      Free for all match info


   .. py:property:: items () -> list[pystk2.Item]
      :annotation: property

      State of items


   .. py:property:: karts () -> list[pystk2.Kart]
      :annotation: property

      State of karts


   .. py:property:: phase () -> pystk2.WorldState.Phase
      :annotation: property

      World status phase


   .. py:property:: players () -> list[pystk2.Player]
      :annotation: property

      State of active players


   .. py:property:: soccer () -> pystk2.Soccer
      :annotation: property

      Soccer match info


   .. py:property:: time () -> float
      :annotation: property

      Game time


.. py:class:: pystk2.Track

   .. py:method:: update (self: pystk2.Track) -> None

   .. py:property:: length () -> float
      :annotation: property

      length of the track


   .. py:property:: path_distance () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Distance down the track of each line segment (float N x 2)


   .. py:property:: path_nodes () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Center line of the drivable area as line segments of 3d coordinates (float N x 2 x 3)


   .. py:property:: path_width () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Width of the path segment (float N)


   .. py:property:: successors () -> list[list[int]]
      :annotation: property

      For each node, its successors (N lists)


.. py:class:: pystk2.Player

   .. py:property:: camera () -> pystk2.Camera
      :annotation: property

      Camera parameters of the player


   .. py:property:: kart () -> pystk2.Kart
      :annotation: property

      Kart of the player


.. py:class:: pystk2.Camera

   .. py:class:: Mode

      .. py:attribute:: CLOSEUP
         :annotation: = 1

      .. py:attribute:: FALLING
         :annotation: = 7

      .. py:attribute:: LEADER_MODE
         :annotation: = 3

      .. py:attribute:: NORMAL
         :annotation: = 0

      .. py:attribute:: REVERSE
         :annotation: = 2

      .. py:property:: name () -> str
         :annotation: property

      .. py:property:: value () -> int
         :annotation: property

   .. py:property:: aspect () -> float
      :annotation: property

      Aspect ratio


   .. py:property:: fov () -> float
      :annotation: property

      Field of view


   .. py:property:: mode () -> pystk2.Camera.Mode
      :annotation: property

      Camera mode


   .. py:property:: projection () -> readonly_memoryview
      :annotation: property

      Projection matrix (float 4x4)


   .. py:property:: view () -> readonly_memoryview
      :annotation: property

      View matrix (float 4x4)


.. py:class:: pystk2.Item

   .. py:class:: Type

      .. py:attribute:: BANANA
         :annotation: = 1

      .. py:attribute:: BONUS_BOX
         :annotation: = 0

      .. py:attribute:: BUBBLEGUM
         :annotation: = 4

      .. py:attribute:: EASTER_EGG
         :annotation: = 6

      .. py:attribute:: NITRO_BIG
         :annotation: = 2

      .. py:attribute:: NITRO_SMALL
         :annotation: = 3

      .. py:property:: name () -> str
         :annotation: property

      .. py:property:: value () -> int
         :annotation: property

   .. py:property:: id () -> int
      :annotation: property

      Item id compatible with instance data


   .. py:property:: location () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      3D world location of the item


   .. py:property:: size () -> float
      :annotation: property

      Size of the object


   .. py:property:: type () -> pystk2.Item.Type
      :annotation: property

      Item type


.. py:class:: pystk2.Kart

   .. py:property:: angular_velocity () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Angular velocity of kart


   .. py:property:: attachment () -> pystk2.Attachment
      :annotation: property

      Attachment of kart


   .. py:property:: distance_down_track () -> float
      :annotation: property

      Distance traveled on current lap


   .. py:property:: energy () -> float
      :annotation: property

      Remaining collected energy


   .. py:property:: finish_time () -> float
      :annotation: property

      Time to complete race


   .. py:property:: finished_laps () -> int
      :annotation: property

      Number of laps completed


   .. py:property:: front () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Front direction of kart 1/2 kart length forward from location


   .. py:property:: has_finished_race () -> bool
      :annotation: property

      True if the kart has finished the race


   .. py:property:: id () -> int
      :annotation: property

      Kart id compatible with instance labels


   .. py:property:: is_on_road () -> bool
      :annotation: property

      Whether the kart is on track


   .. py:property:: jumping () -> bool
      :annotation: property

      Is the kart jumping?


   .. py:property:: lap_time () -> float
      :annotation: property

      Time to completion for last lap


   .. py:property:: lives () -> int
      :annotation: property

      Lives in three strikes battle


   .. py:property:: location () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      3D world location of the kart


   .. py:property:: max_steer_angle () -> float
      :annotation: property

      Maximum steering angle (depends on speed)


   .. py:property:: name () -> str
      :annotation: property

      Player name


   .. py:property:: node () -> int
      :annotation: property

      Closest node


   .. py:property:: overall_distance () -> float
      :annotation: property

      Overall distance traveled


   .. py:property:: player_id () -> int
      :annotation: property

      Player id


   .. py:property:: position () -> int
      :annotation: property

      Current position of this kart in the race


   .. py:property:: powerup () -> pystk2.Powerup
      :annotation: property

      Powerup collected


   .. py:property:: race_result () -> bool
      :annotation: property

      Did the kart win the race?


   .. py:property:: rotation () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Quaternion rotation of the kart [w, x, y, z]


   .. py:property:: shield_time () -> float
      :annotation: property

      Second the shield is up for


   .. py:property:: size () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Width, height and length of kart


   .. py:property:: skeed_factor () -> float
      :annotation: property

      Skid factor


   .. py:property:: speed () -> float
      :annotation: property

      Speed of the kart in meters/second


   .. py:property:: velocity () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Velocity of kart


   .. py:property:: velocity_lc () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      Velocity of kart (in the kart referential)


   .. py:property:: wheel_base () -> float
      :annotation: property

      Wheel base (distance front to rear axis)


.. py:class:: pystk2.Powerup

   .. py:class:: Type

      .. py:attribute:: ANVIL
         :annotation: = 10

      .. py:attribute:: BOWLING
         :annotation: = 3

      .. py:attribute:: BUBBLEGUM
         :annotation: = 1

      .. py:attribute:: CAKE
         :annotation: = 2

      .. py:attribute:: NOTHING
         :annotation: = 0

      .. py:attribute:: PARACHUTE
         :annotation: = 9

      .. py:attribute:: PLUNGER
         :annotation: = 5

      .. py:attribute:: RUBBERBALL
         :annotation: = 8

      .. py:attribute:: SWATTER
         :annotation: = 7

      .. py:attribute:: SWITCH
         :annotation: = 6

      .. py:attribute:: ZIPPER
         :annotation: = 4

      .. py:property:: name () -> str
         :annotation: property

      .. py:property:: value () -> int
         :annotation: property

   .. py:property:: num () -> int
      :annotation: property

      Number of powerups


   .. py:property:: type () -> pystk2.Powerup.Type
      :annotation: property

      Powerup type


.. py:class:: pystk2.Attachment

   .. py:class:: Type

      .. py:attribute:: ANVIL
         :annotation: = 1

      .. py:attribute:: BOMB
         :annotation: = 2

      .. py:attribute:: BUBBLEGUM_SHIELD
         :annotation: = 6

      .. py:attribute:: NOTHING
         :annotation: = 9

      .. py:attribute:: PARACHUTE
         :annotation: = 0

      .. py:attribute:: SWATTER
         :annotation: = 3

      .. py:property:: name () -> str
         :annotation: property

      .. py:property:: value () -> int
         :annotation: property

   .. py:property:: time_left () -> float
      :annotation: property

      Seconds until attachment detaches/explodes


   .. py:property:: type () -> pystk2.Attachment.Type
      :annotation: property

      Attachment type


.. py:class:: pystk2.Soccer

   .. py:property:: ball () -> pystk2.SoccerBall
      :annotation: property

      Soccer ball information


   .. py:property:: goal_line () -> Annotated[list[Annotated[list[float3], 'FixedSize(2)']], 'FixedSize(2)']
      :annotation: property

      Start and end of the goal line for each team


   .. py:property:: score () -> int[2]
      :annotation: property

      Score of the soccer match


.. py:class:: pystk2.SoccerBall

   .. py:property:: id () -> int
      :annotation: property

      Object id of the soccer ball


   .. py:property:: location () -> numpy.typing.NDArray[numpy.float32]
      :annotation: property

      3D world location of the item


   .. py:property:: size () -> float
      :annotation: property

      Size of the ball

