Module game_qu.base.paths
Expand source code
from game_qu.math.linear_interpolation import LinearInterpolation
from game_qu.paths.action_followable_path import ActionFollowablePath
from game_qu.paths.velocity_followable_path import VelocityFollowablePath
class Path(LinearInterpolation):
""" Made up of multiple lines that are all connected. The previous point and the next point are connected by a line.
For instance, a line looks like: LineSegment(points[0], points[1]). IMPORTANT: no LineSegments can share the same
x_coordinate (besides the first x_coordinate between adjacent lines) otherwise the code won't work. Also understand
that this the same as LinearInterpolation. I kept this class to have the API of the library stay the same across
versions. It is not c"""
pass
class VelocityPath(VelocityFollowablePath):
"""A path that takes into account velocity. This is the same as VelocityFollowablePath. I kept this class here to have
the programming API across versions (it is recommended to use the other 'VelocityFollowablePath' because it is
technically more correct)."""
pass
class ActionPath(ActionFollowablePath):
""" A path that performs an action at each of the points. This does not work the FollowablePath methods. This will have
to change in the future. This is the same as ActionFollowablePath. I kept this class here to have
the programming API across versions (it is recommended to use the other 'ActionFollowablePath' because it is
technically more correct)."""
pass
Classes
class ActionPath (start_point, object_on_path, velocity)
-
A path that performs an action at each of the points. This does not work the FollowablePath methods. This will have to change in the future. This is the same as ActionFollowablePath. I kept this class here to have the programming API across versions (it is recommended to use the other 'ActionFollowablePath' because it is technically more correct).
Initializes the object
Expand source code
class ActionPath(ActionFollowablePath): """ A path that performs an action at each of the points. This does not work the FollowablePath methods. This will have to change in the future. This is the same as ActionFollowablePath. I kept this class here to have the programming API across versions (it is recommended to use the other 'ActionFollowablePath' because it is technically more correct).""" pass
Ancestors
Inherited members
class Path (start_point, other_points)
-
Made up of multiple lines that are all connected. The previous point and the next point are connected by a line. For instance, a line looks like: LineSegment(points[0], points[1]). IMPORTANT: no LineSegments can share the same x_coordinate (besides the first x_coordinate between adjacent lines) otherwise the code won't work. Also understand that this the same as LinearInterpolation. I kept this class to have the API of the library stay the same across versions. It is not c
Initializes the object with the start_point and other_points. This method calls add_point() for each point in other_points
Expand source code
class Path(LinearInterpolation): """ Made up of multiple lines that are all connected. The previous point and the next point are connected by a line. For instance, a line looks like: LineSegment(points[0], points[1]). IMPORTANT: no LineSegments can share the same x_coordinate (besides the first x_coordinate between adjacent lines) otherwise the code won't work. Also understand that this the same as LinearInterpolation. I kept this class to have the API of the library stay the same across versions. It is not c""" pass
Ancestors
- LinearInterpolation
- Function
- abc.ABC
Inherited members
class VelocityPath (start_point, other_points, velocity, **kwargs)
-
A path that takes into account velocity. This is the same as VelocityFollowablePath. I kept this class here to have the programming API across versions (it is recommended to use the other 'VelocityFollowablePath' because it is technically more correct).
Initializes the object. Here are the kwargs options:
Args
game_object
:GameObject
- the game object that is following this path
attribute_modifying
:str
- the name of the attribute this path is modifying
Expand source code
class VelocityPath(VelocityFollowablePath): """A path that takes into account velocity. This is the same as VelocityFollowablePath. I kept this class here to have the programming API across versions (it is recommended to use the other 'VelocityFollowablePath' because it is technically more correct).""" pass
Ancestors
- VelocityFollowablePath
- FollowablePath
- abc.ABC
Inherited members