Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asteroid ¶
type Asteroid struct { physics.PhysicBody // contains filtered or unexported fields }
Asteroid is a PhysicalBody agent It represents a bullet shot by a starship agent.
func NewAsteroid ¶
func NewAsteroid( log *logrus.Logger, x, y, screenWidth, screenHeight float64, cbr physics.AgentRegister, cbu physics.AgentUnregister, asteroidImage *ebiten.Image, rubbleImages []*ebiten.Image, debug bool) *Asteroid
NewAsteroid creates a new Asteroid (PhysicalBody agent)
func (*Asteroid) Draw ¶
func (a *Asteroid) Draw(screen *ebiten.Image)
Draw draws the game screen. Draw is called every frame (typically 1/60[s] for 60Hz display).
type Bullet ¶
type Bullet struct { physics.PhysicBody // contains filtered or unexported fields }
Bullet is a PhysicalBody agent It represents a bullet shot by a starship agent.
func NewBullet ¶
func NewBullet(log *logrus.Logger, x, y float64, orientation float64, screenWidth, screenHeight float64, cb physics.AgentUnregister, bulletImage *ebiten.Image) *Bullet
NewBullet creates a new Bullet (PhysicalBody agent)
func (*Bullet) Draw ¶
func (b *Bullet) Draw(screen *ebiten.Image)
Draw draws the game screen. Draw is called every frame (typically 1/60[s] for 60Hz display).
func (*Bullet) SelfDestroy ¶
func (b *Bullet) SelfDestroy()
SelfDestroy removes the agent from the game
type Rubble ¶
type Rubble struct {
physics.PhysicBody
}
Rubble is a PhysicalBody agent It represents a bullet shot by a starship agent.
func NewRubble ¶
func NewRubble(log *logrus.Logger, x, y, screenWidth, screenHeight float64, cbu physics.AgentUnregister, rubbleImage *ebiten.Image, debug bool) *Rubble
NewRubble creates a new Rubble (PhysicalBody agent)
type Starship ¶
type Starship struct { physics.PhysicBody // contains filtered or unexported fields }
Starship is a PhysicalBody agent. It represents a playable star ship.
func NewStarship ¶
func NewStarship( log *logrus.Logger, x, y, screenWidth, screenHeight float64, cbr physics.AgentRegister, cbu physics.AgentUnregister, starshipImage *ebiten.Image, bulletImage *ebiten.Image, debug bool) *Starship
NewStarship creates a new Starship (PhysicalBody agent)
func (*Starship) Draw ¶
func (s *Starship) Draw(screen *ebiten.Image)
Draw draws the game screen. Draw is called every frame (typically 1/60[s] for 60Hz display).
func (*Starship) SelfDestroy ¶
func (s *Starship) SelfDestroy()
SelfDestroy removes the agent from the game