core

package
v0.0.0-...-d12af05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(a, b Vec64) float64

func MarkPoint

func MarkPoint(dst *ebiten.Image, p Vec64, length float64, clr color.Color)

Types

type RectF32

type RectF32 struct {
	Pos       Vec32
	Size      Vec32
	PosInUnit Vec32
}

Rectangle compatible with float32 type fields of ebiten.Vertex struct.

func NewRect

func NewRect(pos, size Vec32) *RectF32

func (RectF32) DrawOuterRect

func (r RectF32) DrawOuterRect(dst *ebiten.Image, clr color.Color)

type TeleComp

type TeleComp struct {
	Rects    [4]RectF32
	NumRects uint8
}

TeleComp (Teleportable Component) holds information about the teleported parts of a game object. This teleported parts are rectangles divided by screen edges.

func (*TeleComp) Update

func (t *TeleComp) Update(pureRect *RectF32)

type TeleCompImage

type TeleCompImage struct {
	TeleComp
	DrawOpts [4]ebiten.DrawImageOptions
}

TeleCompImage is a TeleComp with drawing options for each rectangle to be used in the DrawImage method.

func (*TeleCompImage) Draw

func (t *TeleCompImage) Draw(dst *ebiten.Image)

func (*TeleCompImage) SetColor

func (t *TeleCompImage) SetColor(clr color.Color)

func (*TeleCompImage) Update

func (t *TeleCompImage) Update(pureRect *RectF32)

type TeleCompTriang

type TeleCompTriang struct {
	TeleComp
	// contains filtered or unexported fields
}

TeleCompTriang is TeleComp with triangulation information for the DrawTriangles and DrawTriangleShader methods

func (*TeleCompTriang) SetColor

func (t *TeleCompTriang) SetColor(clr *color.RGBA)

func (*TeleCompTriang) Triangles

func (t *TeleCompTriang) Triangles() ([]ebiten.Vertex, []uint16)

func (*TeleCompTriang) Update

func (t *TeleCompTriang) Update(pureRect *RectF32)

type Vec32

type Vec32 struct {
	X, Y float32
}

func (Vec32) To64

func (v Vec32) To64() Vec64

type Vec64

type Vec64 struct {
	X, Y float64
}

func (Vec64) Floor

func (v Vec64) Floor() Vec64

func (Vec64) To32

func (v Vec64) To32() Vec32

type VecI

type VecI struct {
	X, Y int
}

func (VecI) To32

func (v VecI) To32() Vec32

func (VecI) To64

func (v VecI) To64() Vec64

Jump to

Keyboard shortcuts

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