entity

package
v0.0.0-...-3548feb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ImgAsteroid *ebiten.Image
)

Functions

This section is empty.

Types

type Asteroid

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

func NewAsteroid

func NewAsteroid(posX float64, posY float64, rotation float64) *Asteroid

func (*Asteroid) CheckCollision

func (a *Asteroid) CheckCollision(ship *Ship) bool

func (*Asteroid) CornerBottomLeft

func (a *Asteroid) CornerBottomLeft() (float64, float64)

func (*Asteroid) CornerBottomRight

func (a *Asteroid) CornerBottomRight() (float64, float64)

func (*Asteroid) CornerTopLeft

func (a *Asteroid) CornerTopLeft() (float64, float64)

func (*Asteroid) CornerTopRight

func (a *Asteroid) CornerTopRight() (float64, float64)

func (*Asteroid) Draw

func (a *Asteroid) Draw(screen *ebiten.Image)

func (*Asteroid) Height

func (a *Asteroid) Height() int

func (*Asteroid) Move

func (a *Asteroid) Move(n float64)

func (*Asteroid) Width

func (a *Asteroid) Width() int

type Grid

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

func NewGrid

func NewGrid(width uint, height uint, screenW float64, screenH float64) *Grid

func (*Grid) DrawGridAsteroid

func (g *Grid) DrawGridAsteroid(screen *ebiten.Image)

func (*Grid) DrawGridShip

func (g *Grid) DrawGridShip(screen *ebiten.Image)

func (*Grid) GetCellAsteroid

func (g *Grid) GetCellAsteroid() uint64

func (*Grid) GetCellShip

func (g *Grid) GetCellShip() uint8

func (*Grid) Reset

func (g *Grid) Reset()

func (*Grid) UpdateGridAsteroid

func (g *Grid) UpdateGridAsteroid(a *Asteroid)

func (*Grid) UpdateGridShip

func (g *Grid) UpdateGridShip(s *Ship)

type Ship

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

func NewShip

func NewShip(posX float64, posY float64) *Ship

func (*Ship) CornerTopLeft

func (s *Ship) CornerTopLeft() (float64, float64)

func (*Ship) CornerTopRight

func (s *Ship) CornerTopRight() (float64, float64)

func (*Ship) Draw

func (s *Ship) Draw(screen *ebiten.Image)

func (*Ship) Height

func (s *Ship) Height() int

func (*Ship) Move

func (s *Ship) Move(n float64)

func (*Ship) Width

func (s *Ship) Width() int

Jump to

Keyboard shortcuts

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