Documentation
¶
Overview ¶
Package SkeletonModification2D provides methods for working with SkeletonModification2D object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Implementation
- type Instance
- func (self Instance) Add(peer SkeletonModificationStack2D.Instance)
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsSkeletonModification2D() Instance
- func (self Instance) ClampAngle(angle Angle.Radians, min Angle.Radians, max Angle.Radians, invert bool) Angle.Radians
- func (self Instance) Enabled() bool
- func (self Instance) ExecutionMode() int
- func (self Instance) GetEditorDrawGizmo() bool
- func (self Instance) GetIsSetup() bool
- func (self Instance) GetModificationStack() SkeletonModificationStack2D.Instance
- func (self Instance) ID() ID
- func (self Instance) Set(peer SkeletonModificationStack2D.Instance, mod_idx int)
- func (self Instance) SetEditorDrawGizmo(draw_gizmo bool)
- func (self Instance) SetEnabled(value bool)
- func (self Instance) SetExecutionMode(value int)
- func (self Instance) SetIsSetup(is_setup bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsSkeletonModification2D ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.SkeletonModification2D
This resource provides an interface that can be expanded so code that operates on [Bone2D] nodes in a [Skeleton2D] can be mixed and matched together to create complex interactions. This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
See [Interface] for methods that can be overridden by a [Class] that extends it.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func Get ¶
func Get(peer SkeletonModificationStack2D.Instance, mod_idx int) Instance
Returns the [SkeletonModification2D] at the passed-in index, [param mod_idx].
func (Instance) Add ¶
func (self Instance) Add(peer SkeletonModificationStack2D.Instance)
Adds the passed-in [SkeletonModification2D] to the stack.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsSkeletonModification2D ¶
func (Instance) ClampAngle ¶
func (self Instance) ClampAngle(angle Angle.Radians, min Angle.Radians, max Angle.Radians, invert bool) Angle.Radians
Takes an angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] will inversely clamp the angle, clamping it to the range outside of the given bounds.
func (Instance) ExecutionMode ¶
func (Instance) GetEditorDrawGizmo ¶
Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
func (Instance) GetIsSetup ¶
Returns whether this modification has been successfully setup or not.
func (Instance) GetModificationStack ¶
func (self Instance) GetModificationStack() SkeletonModificationStack2D.Instance
Returns the [SkeletonModificationStack2D] that this modification is bound to. Through the modification stack, you can access the Skeleton2D the modification is operating on.
func (Instance) Set ¶
func (self Instance) Set(peer SkeletonModificationStack2D.Instance, mod_idx int)
Sets the modification at [param mod_idx] to the passed-in modification, [param modification].
func (Instance) SetEditorDrawGizmo ¶
Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
func (Instance) SetEnabled ¶
func (Instance) SetExecutionMode ¶
func (Instance) SetIsSetup ¶
Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up.
type Interface ¶
type Interface interface { //Executes the given modification. This is where the modification performs whatever function it is designed to do. Execute(delta Float.X) //Called when the modification is setup. This is where the modification performs initialization. SetupModification(modification_stack SkeletonModificationStack2D.Instance) //Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overridden to draw custom gizmos. //[b]Note:[/b] You will need to use the Skeleton2D from [method SkeletonModificationStack2D.get_skeleton] and it's draw functions, as the [SkeletonModification2D] resource cannot draw on its own. DrawEditorGizmo() }