objects

package
v0.0.0-...-af59c4b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameObject

type GameObject interface {
	ID() int64
	Type() GameObjectType
	RigidBody() *physics.RigidBody
	Update(delta float64)
	Destroy()
}

type GameObjectType

type GameObjectType string
var GameObjectPlanet GameObjectType = "planet"
var GameObjectPlayer GameObjectType = "planet"
var GameObjectSun GameObjectType = "sun"

type Planet

type Planet struct {

	// public
	Data *types.Planet
	// contains filtered or unexported fields
}

func NewPlanet

func NewPlanet(id int64, data *types.Planet, sun *Sun) *Planet

func (*Planet) Destroy

func (planet *Planet) Destroy()

func (*Planet) ID

func (planet *Planet) ID() int64

func (*Planet) Init

func (planet *Planet) Init() error

func (*Planet) Radius

func (planet *Planet) Radius() float64

func (*Planet) RigidBody

func (planet *Planet) RigidBody() *physics.RigidBody

func (*Planet) Type

func (planet *Planet) Type() GameObjectType

func (*Planet) Update

func (planet *Planet) Update(delta float64)

type Player

type Player struct {
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer(id int64, position *mathf.Vec3) *Player

func (*Player) Destroy

func (player *Player) Destroy()

func (*Player) ID

func (player *Player) ID() int64

func (*Player) Radius

func (player *Player) Radius() float64

func (*Player) RigidBody

func (player *Player) RigidBody() *physics.RigidBody

func (*Player) Type

func (player *Player) Type() GameObjectType

func (*Player) Update

func (player *Player) Update(delta float64)

func (*Player) UpdateMovement

func (player *Player) UpdateMovement(move *mathf.Vec3, rotation *mathf.Vec3)

type Sun

type Sun struct {

	// public
	Data *types.Sun
	// contains filtered or unexported fields
}

func NewSun

func NewSun(id int64, data *types.Sun) *Sun

func (*Sun) Destroy

func (sun *Sun) Destroy()

func (*Sun) ID

func (sun *Sun) ID() int64

func (*Sun) Init

func (sun *Sun) Init() error

func (*Sun) Radius

func (sun *Sun) Radius() float64

func (*Sun) RigidBody

func (sun *Sun) RigidBody() *physics.RigidBody

func (*Sun) Type

func (sun *Sun) Type() GameObjectType

func (*Sun) Update

func (sun *Sun) Update(delta float64)

Jump to

Keyboard shortcuts

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