PartialGraphic

Common features shared by Pose and NinePatch.

A partial texture is a rectangular region of a Graphic.

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ParentResource, name: String, graphicPath: String)

Properties

Link copied to clipboard
open override val children: MutableObservableMap<String, Resource>
Link copied to clipboard
lateinit var graphic: Graphic

The graphic which contains the pose. This is lazily evaluated using graphicPath, so that we can load an entire .kyd file without caring if the definition of the Pose is found BEFORE the definition of its corresponding Graphic.

Link copied to clipboard

Together with graphicTop, graphicLeft and graphicWidth, determines the rectangular region within the graphic.

Link copied to clipboard

Together with graphicTop, graphicWidth, graphicHeight, determines the rectangular region within the graphic. Measured in pixels, with (0,0) being at the top left of the image.

Link copied to clipboard

Only valid while the .kyd file is being loaded. Once loaded, resolveReferences is called, and afterward, graphicPath is reset to blank and no longer used.

Link copied to clipboard

Together with graphicLeft, graphicWidth, graphicHeight, determines the rectangular region within the graphic. Measured in pixels, with (0,0) being at the top left of the image. NOTE. Almost all other coordinates have the Y axis pointing upwards, whereas here, the Y axis points downwards.

Link copied to clipboard

Together with graphicTop, graphicLeft and graphicHeight, determines the rectangular region within the graphic.

Link copied to clipboard
open override val image: Image
Link copied to clipboard
override var name: String
Link copied to clipboard
override var parent: ParentResource
Link copied to clipboard
open override var pin: Vector2

When we animate an Actor, we change the actor's position (Actor.position)

Link copied to clipboard

Functions

Link copied to clipboard
open override fun add(child: Resource)
Link copied to clipboard
open override fun dangerousRename(newName: String)
Link copied to clipboard
open fun find(path: String): Resource?
Link copied to clipboard
Link copied to clipboard
open override fun findChild(name: String): Resource?
Link copied to clipboard
open fun findUnresolved(path: String): Resource?
Link copied to clipboard
override fun game(): Game
Link copied to clipboard
override fun path(): String
Link copied to clipboard

Similar to path, but it also includes a trailing path. This is useful when building descendant paths as there is no special case needed for the root Game.

Link copied to clipboard
open override fun remove(child: Resource)
Link copied to clipboard
open override fun rename(child: Resource, newName: String)
Link copied to clipboard
open override fun resolveReferences(): String?
Link copied to clipboard
open override fun walkTree(onVisit: (Resource) -> Unit)