Documentation ¶
Index ¶
- func InitImages()
- func InitSounds()
- type Alien
- type Character
- type Element
- type Game
- type Missile
- type Object
- type Position
- type Ship
- func (s *Ship) ClockwiseThrustersOff()
- func (s *Ship) ClockwiseThrustersOn()
- func (s *Ship) CounterClockwiseThrustersOff()
- func (s *Ship) CounterClockwiseThrustersOn()
- func (s *Ship) Draw(screen *ebiten.Image, op *ebiten.DrawImageOptions, g *Game)
- func (s *Ship) FireMissile(g *Game)
- func (s *Ship) ForwardThrustersOff()
- func (s *Ship) ForwardThrustersOn()
- func (s *Ship) LeftThrustersOff()
- func (s *Ship) LeftThrustersOn()
- func (s *Ship) ReverseThrustersOff()
- func (s *Ship) ReverseThrustersOn()
- func (s *Ship) RightThrustersOff()
- func (s *Ship) RightThrustersOn()
- func (s *Ship) Update(g *Game)
- type Speed
- type ViewPort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alien ¶
Alien is a squishy fusion reactor boi.
func CreateAlien ¶
CreateAlien creates an alien at a position.
type Character ¶
type Character interface { Up() Down() Left() Right() Cw() Ccw() Attack() AltAttack() Die() }
Character is a controllable character in the game.
type Element ¶
type Element interface { Update(g *Game) Draw(screen *ebiten.Image, op *ebiten.DrawImageOptions, g *Game) }
Element is a visual element within the game.
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game is a game struct for the ebiten game engine.
type Missile ¶
type Missile struct { Object // contains filtered or unexported fields }
Missile is a missile object.
func CreateMissile ¶
CreateMissile created at a position with a speed.
type Object ¶
Object is a physical object in the game.
func (*Object) NewtonsFirstLaw ¶
func (o *Object) NewtonsFirstLaw()
NewtonsFirstLaw applies newton's first law to an object. Objects in motion will stay in motion.
type Position ¶
type Position struct {
// contains filtered or unexported fields
}
Position is a positon in the game.
type Ship ¶
type Ship struct { Object // contains filtered or unexported fields }
Ship is a space ship.
func CreateShip ¶
CreateShip creates an initialized ship at a position with speed.
func (*Ship) ClockwiseThrustersOff ¶
func (s *Ship) ClockwiseThrustersOff()
ClockwiseThrustersOff turns the clockwise thrusters off.
func (*Ship) ClockwiseThrustersOn ¶
func (s *Ship) ClockwiseThrustersOn()
ClockwiseThrustersOn turns the clockwise thrusters on.
func (*Ship) CounterClockwiseThrustersOff ¶
func (s *Ship) CounterClockwiseThrustersOff()
CounterClockwiseThrustersOff turns the counter clockwise thrusters off.
func (*Ship) CounterClockwiseThrustersOn ¶
func (s *Ship) CounterClockwiseThrustersOn()
CounterClockwiseThrustersOn turns the counter clockwise thrusters on.
func (*Ship) FireMissile ¶
FireMissile fires a missile from ship. If ship is out of missiles, a warning sound is played.
func (*Ship) ForwardThrustersOff ¶
func (s *Ship) ForwardThrustersOff()
ForwardThrustersOff turns the forward thrusters off.
func (*Ship) ForwardThrustersOn ¶
func (s *Ship) ForwardThrustersOn()
ForwardThrustersOn turns the forward thrusters on.
func (*Ship) LeftThrustersOff ¶
func (s *Ship) LeftThrustersOff()
LeftThrustersOff turns the left thrusters off.
func (*Ship) LeftThrustersOn ¶
func (s *Ship) LeftThrustersOn()
LeftThrustersOn turns the left thrusters on.
func (*Ship) ReverseThrustersOff ¶
func (s *Ship) ReverseThrustersOff()
ReverseThrustersOff turns the reverse thrusters off.
func (*Ship) ReverseThrustersOn ¶
func (s *Ship) ReverseThrustersOn()
ReverseThrustersOn turns the reverse thrusters on.
func (*Ship) RightThrustersOff ¶
func (s *Ship) RightThrustersOff()
RightThrustersOff turns the right thrusters off.
func (*Ship) RightThrustersOn ¶
func (s *Ship) RightThrustersOn()
RightThrustersOn turns the right thrusters on.
type Speed ¶
type Speed struct {
// contains filtered or unexported fields
}
Speed is an x, y and rotational speed in the game.
type ViewPort ¶
ViewPort is a window a player sees through.
func (*ViewPort) FollowAheadXY ¶
FollowAheadXY position of object
func (*ViewPort) FollowAheadXYR ¶
FollowAheadXYR position of object