perceiving

package
v0.0.0-...-9c16532 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InterpolationBackTime = 100 * time.Millisecond
	InterpolationConstant = 0.01
	InterpolationBuffer   = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bullet

type Bullet struct {
	ID entity.ID
	physics.TranslationalState
	// contains filtered or unexported fields
}

func NewBullet

func NewBullet(id entity.ID) *Bullet

func (*Bullet) Draw

func (b *Bullet) Draw(_ *pixelgl.Canvas, imd *imdraw.IMDraw)

func (*Bullet) FixedUpdate

func (b *Bullet) FixedUpdate()

func (*Bullet) Update

func (b *Bullet) Update(timestamp time.Time, table *flatbuffers.Table)

type Ship

type Ship struct {
	ID entity.ID

	Thrusting bool
	Armed     bool
	// contains filtered or unexported fields
}

func NewShip

func NewShip(id entity.ID) *Ship

func (*Ship) Draw

func (s *Ship) Draw(_ *pixelgl.Canvas, imd *imdraw.IMDraw)

func (*Ship) FixedUpdate

func (s *Ship) FixedUpdate()

func (*Ship) Health

func (s *Ship) Health() int

func (Ship) Lerp

func (s Ship) Lerp(to shipPhysics, delta float64) shipPhysics

func (*Ship) Position

func (s *Ship) Position() pixel.Vec

func (Ship) Step

func (s Ship) Step(dt float64) shipPhysics

func (*Ship) Update

func (s *Ship) Update(timestamp time.Time, table *flatbuffers.Table)

type System

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

func New

func New(manager *entity.Manager, phys *physics.System, self entity.ID) *System

func (*System) Perceive

func (s *System) Perceive(perception *downstream.Perception)

func (*System) Remove

func (s *System) Remove(entity entity.ID)

func (*System) Update

func (s *System) Update(float64)

type Updateable

type Updateable interface {
	Update(timestamp time.Time, data *flatbuffers.Table)
}

Jump to

Keyboard shortcuts

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