Parallax2D

package
v0.0.0-...-a7442fb Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package Parallax2D provides methods for working with Parallax2D 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
	AsParallax2D() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsCanvasItem

func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsNode2D

func (self *Extension[T]) AsNode2D() Node2D.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsParallax2D

func (self *Extension[T]) AsParallax2D() Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.Parallax2D

A [Parallax2D] is used to create a parallax effect. It can move at a different speed relative to the camera movement using [member scroll_scale]. This creates an illusion of depth in a 2D game. If manual scrolling is desired, the [Camera2D] position can be ignored with [member ignore_camera_scroll]. [b]Note:[/b] Any changes to this node's position made after it enters the scene tree will be overridden if [member ignore_camera_scroll] is [code]false[/code] or [member screen_offset] is modified.

var Nil Instance

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

func New

func New() Instance

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode2D

func (self Instance) AsNode2D() Node2D.Instance

func (Instance) AsObject

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

func (Instance) AsParallax2D

func (self Instance) AsParallax2D() Instance

func (Instance) Autoscroll

func (self Instance) Autoscroll() Vector2.XY

func (Instance) FollowViewport

func (self Instance) FollowViewport() bool

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IgnoreCameraScroll

func (self Instance) IgnoreCameraScroll() bool

func (Instance) LimitBegin

func (self Instance) LimitBegin() Vector2.XY

func (Instance) LimitEnd

func (self Instance) LimitEnd() Vector2.XY

func (Instance) RepeatSize

func (self Instance) RepeatSize() Vector2.XY

func (Instance) RepeatTimes

func (self Instance) RepeatTimes() int

func (Instance) ScreenOffset

func (self Instance) ScreenOffset() Vector2.XY

func (Instance) ScrollOffset

func (self Instance) ScrollOffset() Vector2.XY

func (Instance) ScrollScale

func (self Instance) ScrollScale() Vector2.XY

func (Instance) SetAutoscroll

func (self Instance) SetAutoscroll(value Vector2.XY)

func (Instance) SetFollowViewport

func (self Instance) SetFollowViewport(value bool)

func (Instance) SetIgnoreCameraScroll

func (self Instance) SetIgnoreCameraScroll(value bool)

func (Instance) SetLimitBegin

func (self Instance) SetLimitBegin(value Vector2.XY)

func (Instance) SetLimitEnd

func (self Instance) SetLimitEnd(value Vector2.XY)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetRepeatSize

func (self Instance) SetRepeatSize(value Vector2.XY)

func (Instance) SetRepeatTimes

func (self Instance) SetRepeatTimes(value int)

func (Instance) SetScreenOffset

func (self Instance) SetScreenOffset(value Vector2.XY)

func (Instance) SetScrollOffset

func (self Instance) SetScrollOffset(value Vector2.XY)

func (Instance) SetScrollScale

func (self Instance) SetScrollScale(value Vector2.XY)

func (Instance) Virtual

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

Jump to

Keyboard shortcuts

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