actor

package
v0.0.0-...-e229e0e Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: GPL-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FPSActor

type FPSActor struct {
	Entity                 renderer.Entity
	Character              physicsAPI.CharacterController
	MoveSpeed, SprintSpeed float32
	LookSpeed              float32
	// contains filtered or unexported fields
}

an actor that can move around bound by physics (gravity), can jump, can walk/run

func NewFPSActor

func NewFPSActor(entity renderer.Entity, character physicsAPI.CharacterController) *FPSActor

func (*FPSActor) Crouch

func (actor *FPSActor) Crouch()

func (*FPSActor) Jump

func (actor *FPSActor) Jump()

func (*FPSActor) Look

func (actor *FPSActor) Look(dx, dy float32)

func (*FPSActor) Prone

func (actor *FPSActor) Prone()

func (*FPSActor) StandUp

func (actor *FPSActor) StandUp()

func (*FPSActor) StartMovingBackward

func (actor *FPSActor) StartMovingBackward()

func (*FPSActor) StartMovingForward

func (actor *FPSActor) StartMovingForward()

func (*FPSActor) StartSprinting

func (actor *FPSActor) StartSprinting()

func (*FPSActor) StartStrafingLeft

func (actor *FPSActor) StartStrafingLeft()

func (*FPSActor) StartStrafingRight

func (actor *FPSActor) StartStrafingRight()

func (*FPSActor) StopMovingBackward

func (actor *FPSActor) StopMovingBackward()

func (*FPSActor) StopMovingForward

func (actor *FPSActor) StopMovingForward()

func (*FPSActor) StopSprinting

func (actor *FPSActor) StopSprinting()

func (*FPSActor) StopStrafingLeft

func (actor *FPSActor) StopStrafingLeft()

func (*FPSActor) StopStrafingRight

func (actor *FPSActor) StopStrafingRight()

func (*FPSActor) Update

func (actor *FPSActor) Update(dt float64)

type FreeMoveActor

type FreeMoveActor struct {
	Entity   renderer.Entity
	Location mgl32.Vec3

	MoveSpeed, LookSpeed float32
	// contains filtered or unexported fields
}

an actor that can move around freely in space

func NewFreeMoveActor

func NewFreeMoveActor(entity renderer.Entity) *FreeMoveActor

func (*FreeMoveActor) Look

func (actor *FreeMoveActor) Look(dx, dy float32)

func (*FreeMoveActor) StartMovingDown

func (actor *FreeMoveActor) StartMovingDown()

func (*FreeMoveActor) StartMovingLeft

func (actor *FreeMoveActor) StartMovingLeft()

func (*FreeMoveActor) StartMovingRight

func (actor *FreeMoveActor) StartMovingRight()

func (*FreeMoveActor) StartMovingUp

func (actor *FreeMoveActor) StartMovingUp()

func (*FreeMoveActor) StopMovingDown

func (actor *FreeMoveActor) StopMovingDown()

func (*FreeMoveActor) StopMovingLeft

func (actor *FreeMoveActor) StopMovingLeft()

func (*FreeMoveActor) StopMovingRight

func (actor *FreeMoveActor) StopMovingRight()

func (*FreeMoveActor) StopMovingUp

func (actor *FreeMoveActor) StopMovingUp()

func (*FreeMoveActor) Update

func (actor *FreeMoveActor) Update(dt float64)

type PhysicsActor

type PhysicsActor struct {
	Entity renderer.Entity
	Object physicsAPI.PhysicsObject
}

func NewPhysicsActor

func NewPhysicsActor(entity renderer.Entity, object physicsAPI.PhysicsObject) *PhysicsActor

func (*PhysicsActor) Update

func (actor *PhysicsActor) Update(dt float64)

type PhysicsActor2D

type PhysicsActor2D struct {
	Entity renderer.Entity
	Object physicsAPI.PhysicsObject2D
	Mask   mgl32.Vec3
}

func NewPhysicsActor2D

func NewPhysicsActor2D(entity renderer.Entity, object physicsAPI.PhysicsObject2D, mask mgl32.Vec3) *PhysicsActor2D

func (*PhysicsActor2D) Update

func (actor *PhysicsActor2D) Update(dt float64)

Jump to

Keyboard shortcuts

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