SkeletonModification2D

package
v0.0.0-...-7325ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package SkeletonModification2D provides methods for working with SkeletonModification2D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsSkeletonModification2D() Instance
}

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.

%!(EXTRA string=SkeletonModification2D)

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsSkeletonModification2D

func (self Instance) AsSkeletonModification2D() Instance

func (Instance) ClampAngle

func (self Instance) ClampAngle(angle Float.X, min Float.X, max Float.X, invert bool) Float.X

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) Enabled

func (self Instance) Enabled() bool

func (Instance) ExecutionMode

func (self Instance) ExecutionMode() int

func (Instance) GetEditorDrawGizmo

func (self Instance) GetEditorDrawGizmo() bool

Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.

func (Instance) GetIsSetup

func (self Instance) GetIsSetup() bool

Returns whether this modification has been successfully setup or not.

func (Instance) GetModificationStack

func (self Instance) GetModificationStack() [1]gdclass.SkeletonModificationStack2D

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) SetEditorDrawGizmo

func (self Instance) SetEditorDrawGizmo(draw_gizmo bool)

Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.

func (Instance) SetEnabled

func (self Instance) SetEnabled(value bool)

func (Instance) SetExecutionMode

func (self Instance) SetExecutionMode(value int)

func (Instance) SetIsSetup

func (self Instance) SetIsSetup(is_setup bool)

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.

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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 [1]gdclass.SkeletonModificationStack2D)
	//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()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL