renderer

package
v0.0.0-...-0e72a4f Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Background

type Background struct {
	Image *ebiten.Image
	Parts []*BackgroundPart
}

type BackgroundPart

type BackgroundPart struct {
	X16    int
	Y16    int
	Offset float64
	Speed  float64
	Sprite *ebiten.Image
}

type Renderer

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

func NewRenderer

func NewRenderer(width, height int) *Renderer

func (*Renderer) Background

func (r *Renderer) Background(background Background, dstImg *ebiten.Image, playerY float64)

func (*Renderer) Clear

func (r *Renderer) Clear()

func (*Renderer) DebugImage

func (r *Renderer) DebugImage() *ebiten.Image

func (*Renderer) DebugPrintAt

func (r *Renderer) DebugPrintAt(msg string, xpos, ypos int)

func (*Renderer) Image

func (r *Renderer) Image() *ebiten.Image

func (*Renderer) Polygon

func (r *Renderer) Polygon(x1 float64, y1 float64, x2 float64, y2 float64, x3 float64, y3 float64, x4 float64, y4 float64, color string)

func (*Renderer) ResetDebug

func (r *Renderer) ResetDebug()

func (*Renderer) Segment

func (r *Renderer) Segment(width, lanes int, x1, y1, w1, x2, y2, w2 float64, color SegmentColor)

type SegmentColor

type SegmentColor struct {
	Road   string
	Grass  string
	Rumble string
	Lane   string
}

Jump to

Keyboard shortcuts

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