engine

package
v0.0.0-...-c67ce8d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Raycaster

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

func NewRaycaster

func NewRaycaster(rt RenderTarget, w World) *Raycaster

func (*Raycaster) Dir

func (rc *Raycaster) Dir() vec2.T

func (*Raycaster) Move

func (rc *Raycaster) Move(v vec2.T)

func (*Raycaster) Pos

func (rc *Raycaster) Pos() vec2.T

func (*Raycaster) Render

func (rc *Raycaster) Render()

func (*Raycaster) Rotate

func (rc *Raycaster) Rotate(r float64)

type RenderTarget

type RenderTarget interface {
	Bounds() image.Rectangle
	Set(x, y int, c color.Color)
	SetZ(x int, z float64)
	GetZ(x int) float64
}

type SpriteInstance

type SpriteInstance struct {
	Pos vec2.T
	Tex Texture
	// contains filtered or unexported fields
}

type SpriteInstances

type SpriteInstances []SpriteInstance

func (SpriteInstances) Len

func (s SpriteInstances) Len() int

func (SpriteInstances) Less

func (s SpriteInstances) Less(i, j int) bool

func (SpriteInstances) Swap

func (s SpriteInstances) Swap(i, j int)

type Spritecaster

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

func NewSpritecaster

func NewSpritecaster(sprites SpriteInstances) *Spritecaster

func (*Spritecaster) Render

func (sc *Spritecaster) Render(rc *Raycaster)

type Texture

type Texture interface {
	Bounds() image.Rectangle
	At(x, y int) color.Color
}

type World

type World interface {
	GetTexture(index, shade int) Texture
	GetTile(x, y int) int
}

Jump to

Keyboard shortcuts

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