clicker

package
v0.0.0-...-e1bfed2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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 Button

type Button interface {
	In(x, y int) bool
	Draw(screen *ebiten.Image, g *Game)
	Update(g *Game)
	OnPressed(g *Game) bool
}

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 EventData

type EventData struct {
	Stage       int
	Title       string
	Type1       int
	Type2       float64
	Cost        float64
	Feature     string
	Description string
}

type Game

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

func NewGame

func NewGame() *Game

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

func (*Game) DrawEarth

func (g *Game) DrawEarth(screen *ebiten.Image)

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)

func (*Game) DrawSpace

func (g *Game) DrawSpace(screen *ebiten.Image)

func (*Game) Layout

func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*Game) Load

func (g *Game) Load()

func (*Game) Save

func (g *Game) Save()

func (*Game) Update

func (g *Game) Update() error

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

type ShipData

type ShipData struct {
	Name     string
	Img      *ebiten.Image
	BaseCost float64
	Exponent float64
	DPS      float64
}

Jump to

Keyboard shortcuts

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