Documentation ¶
Index ¶
- Constants
- Variables
- func AirplaneImageByFaction(faction component.PlayerFaction, level int) *ebiten.Image
- func MustFindCamera(w donburi.World) *donburi.Entry
- func MustFindPlayerByNumber(w donburi.World, playerNumber int) *component.PlayerData
- func NewAirbaseAirplane(w donburi.World, position math.Vec2, faction component.PlayerFaction, ...)
- func NewAirplaneWreck(w donburi.World, parent *donburi.Entry, sprite *component.SpriteData)
- func NewCamera(w donburi.World, startPosition math.Vec2) *donburi.Entry
- func NewCrosshair(w donburi.World, parent *donburi.Entry)
- func NewEnemyAirplane(w donburi.World, position math.Vec2, rotation float64, speed float64, ...)
- func NewEnemyBullet(w donburi.World, position math.Vec2, rotation float64)
- func NewEnemyMissile(w donburi.World, position math.Vec2, rotation float64)
- func NewEnemySpawn(w donburi.World, position math.Vec2, spawnFunc component.SpawnFunc)
- func NewEnemyTank(w donburi.World, position math.Vec2, rotation float64, speed float64, ...)
- func NewEnemyTurretBeam(w donburi.World, position math.Vec2, rotation float64)
- func NewEnemyTurretMissiles(w donburi.World, position math.Vec2, rotation float64)
- func NewJoystick(w donburi.World, pos math.Vec2) *donburi.Entry
- func NewPlayer(w donburi.World, playerNumber int, faction component.PlayerFaction) *donburi.Entry
- func NewPlayerAirplane(w donburi.World, player component.PlayerData, faction component.PlayerFaction, ...)
- func NewPlayerBullet(w donburi.World, player *component.PlayerData, position math.Vec2)
- func NewPlayerFromPlayerData(w donburi.World, playerData component.PlayerData) *donburi.Entry
- func NewRandomCollectible(w donburi.World, position math.Vec2)
- func NewShadow(w donburi.World, parent *donburi.Entry) *donburi.Entry
- func ShadowDrawOptions(op *ebiten.DrawImageOptions)
- func ShadowImage(source *ebiten.Image) *ebiten.Image
- type PlayerInputs
- type PlayerSettings
Constants ¶
View Source
const (
// TODO Should this be based on the sprite's width?
MaxShadowPosition = 12
)
Variables ¶
View Source
var Players = map[int]PlayerSettings{ 1: { Inputs: PlayerInputs{ Up: ebiten.KeyW, Right: ebiten.KeyD, Down: ebiten.KeyS, Left: ebiten.KeyA, Shoot: ebiten.KeySpace, }, }, 2: { Inputs: PlayerInputs{ Up: ebiten.KeyUp, Right: ebiten.KeyRight, Down: ebiten.KeyDown, Left: ebiten.KeyLeft, Shoot: ebiten.KeyEnter, }, }, }
Functions ¶
func AirplaneImageByFaction ¶
func AirplaneImageByFaction(faction component.PlayerFaction, level int) *ebiten.Image
func MustFindPlayerByNumber ¶
func MustFindPlayerByNumber(w donburi.World, playerNumber int) *component.PlayerData
func NewAirbaseAirplane ¶
func NewAirplaneWreck ¶
func NewEnemyAirplane ¶
func NewEnemySpawn ¶
func NewEnemyTank ¶
func NewEnemyTurretBeam ¶
func NewEnemyTurretMissiles ¶
func NewPlayerAirplane ¶
func NewPlayerAirplane(w donburi.World, player component.PlayerData, faction component.PlayerFaction, evolutionLevel int)
func NewPlayerBullet ¶
func NewPlayerFromPlayerData ¶
func ShadowDrawOptions ¶
func ShadowDrawOptions(op *ebiten.DrawImageOptions)
func ShadowImage ¶
func ShadowImage(source *ebiten.Image) *ebiten.Image
Types ¶
type PlayerInputs ¶
type PlayerInputs struct { Up ebiten.Key Right ebiten.Key Down ebiten.Key Left ebiten.Key Shoot ebiten.Key }
type PlayerSettings ¶
type PlayerSettings struct {
Inputs PlayerInputs
}
Click to show internal directories.
Click to hide internal directories.