domain

package
v0.0.0-...-668c111 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ball

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

Ball the 2d moving object

func NewBall

func NewBall(x, y float64, swidth, sheight int, img *ebiten.Image) *Ball

NewBall creates a new ball instance

func (*Ball) Bounce

func (ball *Ball) Bounce(p ...Poser)

Bounce bounce on the colliders

func (*Ball) Draw

func (ball *Ball) Draw(screen *ebiten.Image)

Draw draws the screen

IsDrawingSkipped needs to before this draw

func (*Ball) Move

func (ball *Ball) Move()

Move moves the ball by units

type Pedal

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

Pedal ..

func NewPedal

func NewPedal(x, y, swidth, sheight int, img *ebiten.Image) *Pedal

NewPedal initializes

func (*Pedal) Draw

func (pedal *Pedal) Draw(screen *ebiten.Image)

Draw draws the screen

IsDrawingSkipped needs to before this draw

func (*Pedal) Move

func (pedal *Pedal) Move(units int, left, right ebiten.Key)

Move moves the pedal by units

func (*Pedal) Pos

func (pedal *Pedal) Pos() (int, int, int, int)

Pos returns the position perimeter idk whats called

func (*Pedal) Scores

func (pedal *Pedal) Scores()

Scores use this if pedal scored a point

type Poser

type Poser interface {
	Pos() (x, y, w, h int)
}

Poser struct must give us their location

Jump to

Keyboard shortcuts

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