Documentation
¶
Index ¶
- func PlayerCharacterNativescriptInit()
- func PlayerCharacterNativescriptTerminate()
- type PlayerCharacter
- func (p *PlayerCharacter) BaseClass() string
- func (p *PlayerCharacter) ClassName() string
- func (p *PlayerCharacter) Free()
- func (p *PlayerCharacter) GetName() gdnative.String
- func (p *PlayerCharacter) GetVelocity() gdnative.Variant
- func (p *PlayerCharacter) Init()
- func (p *PlayerCharacter) OnClassRegistered(e gdnative.ClassRegisteredEvent)
- func (p *PlayerCharacter) PhysicsProcess(delta float64)
- func (p *PlayerCharacter) RandomName()
- func (p *PlayerCharacter) RandomTeleport(distance float64)
- func (p *PlayerCharacter) Ready()
- func (p *PlayerCharacter) RunGinkgoTestSuite() gdnative.Variant
- func (p *PlayerCharacter) SetName(v gdnative.String)
- func (p *PlayerCharacter) SetVelocity(v gdnative.Variant)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlayerCharacterNativescriptInit ¶
func PlayerCharacterNativescriptInit()
PlayerCharacterNativescriptInit called after NativeScript initializes
func PlayerCharacterNativescriptTerminate ¶
func PlayerCharacterNativescriptTerminate()
PlayerCharacterNativescriptTerminate called before NativeScript terminates
Types ¶
type PlayerCharacter ¶
type PlayerCharacter struct { gdnative.KinematicBody2DImpl gdnative.UserDataIdentifiableImpl // contains filtered or unexported fields }
PlayerCharacter is a custom NativeScript class that represents an entity in the game that the player controls
func NewPlayerCharacter ¶
func NewPlayerCharacter() PlayerCharacter
NewPlayerCharacter is the constructor that creates an instance recognized by Godot
func (*PlayerCharacter) BaseClass ¶
func (p *PlayerCharacter) BaseClass() string
BaseClass is required for NativeScript class registration with Godot.
func (*PlayerCharacter) ClassName ¶
func (p *PlayerCharacter) ClassName() string
ClassName is required for NativeScript class registration with Godot.
func (*PlayerCharacter) Free ¶
func (p *PlayerCharacter) Free()
Free should be called to clean up memory
func (*PlayerCharacter) GetName ¶
func (p *PlayerCharacter) GetName() gdnative.String
GetName returns the name to Godot
func (*PlayerCharacter) GetVelocity ¶
func (p *PlayerCharacter) GetVelocity() gdnative.Variant
GetVelocity returns the velocity to Godot
func (*PlayerCharacter) Init ¶
func (p *PlayerCharacter) Init()
Init should be used to initialize anything before the class gets added to a Scene.
func (*PlayerCharacter) OnClassRegistered ¶
func (p *PlayerCharacter) OnClassRegistered(e gdnative.ClassRegisteredEvent)
OnClassRegistered is designed have all methods, signals, and properties registered in the function.
func (*PlayerCharacter) PhysicsProcess ¶
func (p *PlayerCharacter) PhysicsProcess(delta float64)
PhysicsProcess is mapped to the _physics_process method.
func (*PlayerCharacter) RandomName ¶
func (p *PlayerCharacter) RandomName()
RandomName generates a random 10 character string to assign as the player's name.
func (*PlayerCharacter) RandomTeleport ¶
func (p *PlayerCharacter) RandomTeleport(distance float64)
RandomTeleport teleports the player to a random location within the range of distance.
func (*PlayerCharacter) Ready ¶
func (p *PlayerCharacter) Ready()
Ready is mapped to the _ready method, which is called after being added to the Scene.
func (*PlayerCharacter) RunGinkgoTestSuite ¶
func (p *PlayerCharacter) RunGinkgoTestSuite() gdnative.Variant
RunGinkgoTestSuite is the entrypoint for the ginkgo test suite
func (*PlayerCharacter) SetName ¶
func (p *PlayerCharacter) SetName(v gdnative.String)
SetName is called when the name property is modified by Godot
func (*PlayerCharacter) SetVelocity ¶
func (p *PlayerCharacter) SetVelocity(v gdnative.Variant)
SetVelocity is called when the velocity property is modified by Godot