Documentation ¶
Index ¶
- Constants
- type BaseButton
- type Button
- type BuyAmountButton
- type EventButton
- type EventData
- type Game
- func (g *Game) Draw(screen *ebiten.Image)
- func (g *Game) DrawEarth(screen *ebiten.Image)
- func (g *Game) DrawGalaxy(screen *ebiten.Image)
- func (g *Game) DrawSector(screen *ebiten.Image)
- func (g *Game) DrawSolarSystem(screen *ebiten.Image)
- func (g *Game) DrawSpace(screen *ebiten.Image)
- func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)
- func (g *Game) Load()
- func (g *Game) Save()
- func (g *Game) Update() error
- type GameState
- type ShipButton
- type ShipData
Constants ¶
View Source
const ( SHIP_CONTROL_TOP_OFFSET = 104 SHIP_BOTTOM_PADDING = 6 IMG_SIZE = 72 SHIP_COLUMN_WIDTH = 410 BASE_PPI_BONUS = 2 BG_LINE_WIDTH = 2 GAME_WIDTH = 1024 GAME_HEIGHT = 576 STATUS_BAR_HEIGHT = 64 BOTTOM_BAR_HEIGHT = 64 NUM_EVENT_BUTTONS = 5 EVENT_BUTTON_WIDTH = 136 EVENT_BUTTON_HEIGHT = 72 )
View Source
const ( EARTH = 0 SYSTEM = 1 SECTOR = 2 GALAXY = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseButton ¶
type BaseButton struct {
// contains filtered or unexported fields
}
func (*BaseButton) Draw ¶
func (b *BaseButton) Draw(screen *ebiten.Image)
func (*BaseButton) In ¶
func (b *BaseButton) In(x, y int) bool
func (*BaseButton) OnPressed ¶
func (b *BaseButton) OnPressed(g *Game) bool
func (*BaseButton) Update ¶
func (b *BaseButton) Update(g *Game)
type BuyAmountButton ¶
type BuyAmountButton struct { BaseButton // contains filtered or unexported fields }
func (*BuyAmountButton) Draw ¶
func (b *BuyAmountButton) Draw(screen *ebiten.Image, g *Game)
func (*BuyAmountButton) OnPressed ¶
func (b *BuyAmountButton) OnPressed(g *Game) bool
type EventButton ¶
type EventButton struct { BaseButton // contains filtered or unexported fields }
func (*EventButton) Draw ¶
func (b *EventButton) Draw(screen *ebiten.Image, g *Game)
func (*EventButton) OnPressed ¶
func (b *EventButton) OnPressed(g *Game) bool
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func (*Game) DrawGalaxy ¶
func (g *Game) DrawGalaxy(screen *ebiten.Image)
func (*Game) DrawSector ¶
func (g *Game) DrawSector(screen *ebiten.Image)
func (*Game) DrawSolarSystem ¶
func (g *Game) DrawSolarSystem(screen *ebiten.Image)
type GameState ¶
type GameState struct { Version string `json:"version"` LastUpdate time.Time `json:"lastUpdate"` CurMoney float64 `json:"curMoney"` TotalMoney float64 `json:"totalMoney"` PlayTime int `json:"playTime"` PPI float64 `json:"ppi"` ShipCounts []int `json:"shipCOunts"` EventPurchased []bool `json:"eventPurchased"` }
type ShipButton ¶
type ShipButton struct { BaseButton // contains filtered or unexported fields }
func (*ShipButton) Draw ¶
func (b *ShipButton) Draw(screen *ebiten.Image, g *Game)
func (*ShipButton) OnPressed ¶
func (b *ShipButton) OnPressed(g *Game) bool
Click to show internal directories.
Click to hide internal directories.