asteroids

package
v0.0.0-...-3f01373 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBullet

func NewBullet(position sh2d.Vector2D, rotation float64, velocity sh2d.Vector2D) *sh2d.GameObject

NewBullet creates a new bullet that flies in a certain direction

func NewPlayer

func NewPlayer(position sh2d.Vector2D) *sh2d.GameObject

NewPlayer creates a new player game object

Types

type BulletMover

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

func (*BulletMover) Draw

func (b *BulletMover) Draw(screen *ebiten.Image) error

func (*BulletMover) Update

func (b *BulletMover) Update() error

type KeyboardController

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

KeyboardController handles player movement

func NewKeyboardController

func NewKeyboardController(container *sh2d.GameObject) *KeyboardController

func (*KeyboardController) Draw

func (k *KeyboardController) Draw(screen *ebiten.Image) error

func (*KeyboardController) Update

func (k *KeyboardController) Update() error

type PlayerMouseController

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

PlayerMouseController handles mouse input for the player

func NewPlayerMouseController

func NewPlayerMouseController(container *sh2d.GameObject) *PlayerMouseController

NewPlayerMouseController creates a new PlayerMouseController

func (*PlayerMouseController) Draw

func (controller *PlayerMouseController) Draw(screen *ebiten.Image) error

Draw draws the mouse controller

func (*PlayerMouseController) Update

func (c *PlayerMouseController) Update() error

Update updates the controller every frame

Jump to

Keyboard shortcuts

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