Package-level declarations
Types
Commonality shared by Game, ActResource and all other ParentResource concrete types.
Commonality shared by Folder and other ParentResources.
An Actor represents every item you see within the game, and is arguably the most important Kyd class,
Defines how an Actor moves etc.
This class is NOT used, it is used for documentation only.
Java's Enums are infuriating. If you have an instance of an Enum, there is no way to enumerate all possible values. Isn't that ironic given 'Enum' is short for enumeration. You need the Enum's type (at compile-time, which Kyd doesn't have)
A ParentResource which has no data of its own, but only acts as a parent for a group of children.
The root node of a game's tree of resources. Each node in this tree implements the Resource interface.
A reference to another resource (similar to symbolic links in *nix filesystems).
Management exists the entire time that the program is running, and is in charge of the boring nitty-gritty, such as loading Acts.
Many Behaviours are never interact with mouse presses, and if we checked every single Role when a mouse was pressed/released, this would be quite expensive (because to convert from screen coordinates to the Actor's local coordinates is non-trivial).
Boilerplate which avoids having to use generics. Instead of ObservableValue<Vector2>
, use ObservableVector2
.
Checks if two actors overlap each other.
Checks that actors bounding rectangles overlap, and then checks if any pixels overlap. i.e. any non-transparent pixels of actorA
are in the same place as any non-transparent pixels of actorB
.
Boilerplate which avoids having to use generics. Instead of ReadOnlyProperty<Vector2>
, use ReadOnlyVector2Property
.
Never use this class directly. Use Vector2Property.asReadOnly to obtain a read-only version of a mutable Vector2Property.
Boilerplate which avoids having to use generics. Instead of SimpleProperty<Vector2>
, we can use SimpleVector2Property
.
Performs 2 Touching tests. If the second test is only carried out if the first test passes.
Touching test which also checks the actor's children.
Checks if an actor or any of its descendant actors are touching the given point.
Returns true iff the pixel at the given point has a alpha value alphaThreshold.
Boilerplate which avoids having to use generics. Instead of ValidatedProperty<Vector2>
, we can use ValidatedVector2Property
.
Boilerplate which avoids having to use generics. An ObservableVector2 which is calculated from 2 (binary) other ObservableValues.
Boilerplate which avoids having to use generics. Instead of Property<Vector2>
, use Vector2Property
.
Boilerplate which avoids having to use generics. An ObservableVector2 which is calculated from 3 (ternary) other ObservableValues.
Boilerplate which avoids having to use generics. An ObservableVector2 which is calculated from 1 (unary) other ObservableValue.
A Stage which automatically orders the Actors by Actor.zOrder.
Properties
Functions
For JVM-only games, it is sufficient to add @Custom to properties. The default implementation of Customisable.customProperties calls this, which uses reflection to find each Property tagged with a Custom annotation.
Returns not only the Property, but the Custom attribute too, so that the editor can use Custom.about and Custom.isAct etc.
A Kotlin delegate
to create a ValidatedVector2Property. Typical usage :
A Kotlin delegate
to create a Vector2Property (the implementation will be a SimpleVector2Property. Typical usage :