NavigationLink2D

package
v0.0.0-...-59761c8 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

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

type Instance

type Instance [1]gdclass.NavigationLink2D

A link between two positions on [NavigationRegion2D]s that agents can be routed through. These positions can be on the same [NavigationRegion2D] or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation polygon, such as ziplines, teleporters, or gaps that can be jumped across.

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

func (self Instance) AsNavigationLink2D() 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) Bidirectional

func (self Instance) Bidirectional() bool

func (Instance) Enabled

func (self Instance) Enabled() bool

func (Instance) EndPosition

func (self Instance) EndPosition() Vector2.XY

func (Instance) EnterCost

func (self Instance) EnterCost() Float.X

func (Instance) GetGlobalEndPosition

func (self Instance) GetGlobalEndPosition() Vector2.XY

Returns the [member end_position] that is relative to the link as a global position.

func (Instance) GetGlobalStartPosition

func (self Instance) GetGlobalStartPosition() Vector2.XY

Returns the [member start_position] that is relative to the link as a global position.

func (Instance) GetNavigationLayerValue

func (self Instance) GetNavigationLayerValue(layer_number int) bool

Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.

func (Instance) GetNavigationMap

func (self Instance) GetNavigationMap() RID.NavigationMap2D

Returns the current navigation map [RID] used by this link.

func (Instance) GetRid

func (self Instance) GetRid() RID.NavigationLink2D

Returns the [RID] of this link on the [NavigationServer2D].

func (Instance) NavigationLayers

func (self Instance) NavigationLayers() int

func (Instance) SetBidirectional

func (self Instance) SetBidirectional(value bool)

func (Instance) SetEnabled

func (self Instance) SetEnabled(value bool)

func (Instance) SetEndPosition

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

func (Instance) SetEnterCost

func (self Instance) SetEnterCost(value Float.X)

func (Instance) SetGlobalEndPosition

func (self Instance) SetGlobalEndPosition(position Vector2.XY)

Sets the [member end_position] that is relative to the link from a global [param position].

func (Instance) SetGlobalStartPosition

func (self Instance) SetGlobalStartPosition(position Vector2.XY)

Sets the [member start_position] that is relative to the link from a global [param position].

func (Instance) SetNavigationLayerValue

func (self Instance) SetNavigationLayerValue(layer_number int, value bool)

Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.

func (Instance) SetNavigationLayers

func (self Instance) SetNavigationLayers(value int)

func (Instance) SetNavigationMap

func (self Instance) SetNavigationMap(navigation_map RID.NavigationMap2D)

Sets the [RID] of the navigation map this link should use. By default the link will automatically join the [World2D] default navigation map so this function is only required to override the default map.

func (Instance) SetStartPosition

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

func (Instance) SetTravelCost

func (self Instance) SetTravelCost(value Float.X)

func (Instance) StartPosition

func (self Instance) StartPosition() Vector2.XY

func (Instance) TravelCost

func (self Instance) TravelCost() Float.X

func (*Instance) UnsafePointer

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

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