models

package
v0.0.0-...-2ca4b79 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bullet

type Bullet struct {
	Position  Position
	Direction int
	Speed     int
	IsActive  bool
	Height    float64
}

func (*Bullet) Fire

func (b *Bullet) Fire()

func (*Bullet) HasCollided

func (b *Bullet) HasCollided(leftEdge, rightEdge, topEdge, bottomEdge float64) bool

func (*Bullet) HasCollidedBullets

func (b *Bullet) HasCollidedBullets(otherBullet Bullet) bool

type Enemy

type Enemy struct {
	Position Position
	Img      *ebiten.Image
	Scale    float64
	State    EntityState.EntityState
}

func (*Enemy) GetEnemyHeight

func (e *Enemy) GetEnemyHeight() float64

func (*Enemy) GetEnemyWidth

func (e *Enemy) GetEnemyWidth() float64

type EnemyState

type EnemyState struct {
	EnemyCount          int
	HorizontalDirection int
	HorizontalSpeed     float64
	BulletCount         int
	EnemyFireRate       int
	EnemyBullets        []Bullet
}

type Player

type Player struct {
	Position Position
	Lives    int
	Speed    float64
	Bullet   Bullet
}

func (*Player) MoveLeft

func (p *Player) MoveLeft()

func (*Player) MoveRight

func (p *Player) MoveRight(rightBoundary float64)

type Position

type Position struct {
	X, Y float64
}

type Rectangle

type Rectangle struct {
	Position      Position
	Width, Height float64
	Color         color.Color
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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