objects

package
v0.0.0-...-185e3b9 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartRocketX   = 750
	StartRocketY   = -31
	RocketMaxSpeed = 5
	RocketWidth    = 64
	RocketHeight   = 128
)
View Source
const (
	ChangeBlinkingStarsMaxTime = 50
)
View Source
const (
	FallingFuelVelocity = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlinkingStar

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

func NewBlinkingStar

func NewBlinkingStar(img *ebiten.Image) *BlinkingStar

func (*BlinkingStar) Draw

func (b *BlinkingStar) Draw(screen *ebiten.Image, spriteCount int)

func (*BlinkingStar) MoveTo

func (b *BlinkingStar) MoveTo(x int, y int)

type Enemy

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

func NewEnemy

func NewEnemy(enemySprites []*ebiten.Image) *Enemy

func (*Enemy) CollisionHitBox

func (e *Enemy) CollisionHitBox() *ebiten.Image

func (*Enemy) Draw

func (e *Enemy) Draw(screen *ebiten.Image)

func (*Enemy) Position

func (e *Enemy) Position() (int, int)

func (*Enemy) Update

func (e *Enemy) Update()

type Floor

type Floor struct {
	FloorType FloorType

	Lavadrop *Lavadrop
	// contains filtered or unexported fields
}

func NewFloor

func NewFloor(floorSprites []*ebiten.Image) *Floor

func (*Floor) CollisionHitBox

func (f *Floor) CollisionHitBox() *ebiten.Image

func (*Floor) Draw

func (f *Floor) Draw(screen *ebiten.Image, spriteCount int)

func (*Floor) InitFloor

func (f *Floor) InitFloor()

func (*Floor) IsLavaFloor

func (f *Floor) IsLavaFloor() bool

func (*Floor) MoveTo

func (f *Floor) MoveTo(x int, y int)

func (*Floor) Position

func (f *Floor) Position() (int, int)

func (*Floor) Update

func (f *Floor) Update()

type FloorType

type FloorType int
const (
	FloorNormal FloorType = iota
	FloorLava
	FloorLavaWithDrops
)

type Fuel

type Fuel struct {
	Snaps bool
	// contains filtered or unexported fields
}

func NewFuel

func NewFuel(imgFuel *ebiten.Image, imgParachute *ebiten.Image) *Fuel

func (*Fuel) CollisionHitBox

func (f *Fuel) CollisionHitBox() *ebiten.Image

func (*Fuel) Draw

func (f *Fuel) Draw(screen *ebiten.Image)

func (*Fuel) MoveTo

func (f *Fuel) MoveTo(x int, y int)

func (*Fuel) Position

func (f *Fuel) Position() (int, int)

func (*Fuel) SetFinalPosition

func (f *Fuel) SetFinalPosition(x int, y int)

func (*Fuel) SetFinalPositionIntoPlatform

func (f *Fuel) SetFinalPositionIntoPlatform(platformPosX int, platformPosY int, PlatformWidth int)

func (*Fuel) Update

func (f *Fuel) Update()

type Lavadrop

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

func NewLavadrop

func NewLavadrop(lavaDropImg *ebiten.Image) *Lavadrop

func (*Lavadrop) CollisionHitBox

func (l *Lavadrop) CollisionHitBox() *ebiten.Image

func (*Lavadrop) Draw

func (l *Lavadrop) Draw(screen *ebiten.Image)

func (*Lavadrop) Position

func (l *Lavadrop) Position() (int, int)

func (*Lavadrop) SetInitialPosition

func (l *Lavadrop) SetInitialPosition(x int, y int)

func (*Lavadrop) Update

func (l *Lavadrop) Update() bool
type Mainmenu struct {
	// contains filtered or unexported fields
}

func NewMainmenu

func NewMainmenu(imgMainmenu *ebiten.Image) *Mainmenu
func (m *Mainmenu) Draw(screen *ebiten.Image)

type Platform

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

func NewPlatform

func NewPlatform(platformSprites []*ebiten.Image) *Platform

func (*Platform) Draw

func (p *Platform) Draw(screen *ebiten.Image)

func (*Platform) MoveTo

func (p *Platform) MoveTo(x int, y int)

func (*Platform) Position

func (p *Platform) Position() (int, int)

type Player

type Player struct {
	Lives int

	PlayerStatus PlayerStatus

	HasFuel            bool
	InmuneToDamageTime int
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer(playerSprites []*ebiten.Image) *Player

func (*Player) CollisionHitBox

func (p *Player) CollisionHitBox() *ebiten.Image

func (*Player) Draw

func (p *Player) Draw(screen *ebiten.Image, spriteCount int)

func (*Player) GetCenter

func (p *Player) GetCenter() (int, int)

func (*Player) GetX

func (p *Player) GetX() int

func (*Player) GetY

func (p *Player) GetY() int

func (*Player) HandsPosition

func (p *Player) HandsPosition() (int, int)

func (*Player) LostLive

func (p *Player) LostLive()

func (*Player) MoveLeft

func (p *Player) MoveLeft()

func (*Player) MoveRight

func (p *Player) MoveRight()

func (*Player) MoveTo

func (p *Player) MoveTo(x int, y int)

func (*Player) MoveUp

func (p *Player) MoveUp()

func (*Player) Position

func (p *Player) Position() (int, int)

func (*Player) Restart

func (p *Player) Restart(posX int)

func (*Player) RestartLives

func (p *Player) RestartLives()

func (*Player) Update

func (p *Player) Update()

type PlayerStatus

type PlayerStatus int
const (
	WalkingLeft PlayerStatus = iota
	WalkingRight
	WalkingRightWithFuel
	WalkingLeftWithFuel
	FlyingLeft
	FlyingRight
	Center
)

type Rocket

type Rocket struct {
	LandedY      int
	LandingSpeed float32

	FuelIndicatorItems int
	// contains filtered or unexported fields
}

func NewRocket

func NewRocket(rocketSprites []*ebiten.Image) *Rocket

func (*Rocket) CollisionHitBox

func (r *Rocket) CollisionHitBox() *ebiten.Image

func (*Rocket) Draw

func (r *Rocket) Draw(screen *ebiten.Image)

func (*Rocket) GetX

func (r *Rocket) GetX() int

func (*Rocket) GetY

func (r *Rocket) GetY() int

func (*Rocket) Landing

func (r *Rocket) Landing()

func (*Rocket) MoveTo

func (r *Rocket) MoveTo(x int, y int)

func (*Rocket) Position

func (r *Rocket) Position() (int, int)

func (*Rocket) RestartFuelItems

func (r *Rocket) RestartFuelItems()

func (*Rocket) SetFireAllways

func (r *Rocket) SetFireAllways()

func (*Rocket) TakeOff

func (r *Rocket) TakeOff()

Jump to

Keyboard shortcuts

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