game

package
v0.0.0-...-c0736c2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 游戏开始
	GameModeStart = iota
	// 菜单选择
	GameModeMenuSelect
	// 任务选择
	GameModeMissionSelect
	// 任务加载
	GameModeMissionLoading
	// 任务开始
	GameModeMissionStart
	// 任务进行中
	GameModeMissionRunning
	// 任务结束 - 成功
	GameModeMissionSuccess
	// 任务结束 - 失败
	GameModeMissionFailed
	// 游戏图鉴
	GameModeCollection
	// 游戏设置
	GameModeGameSetting
	// 游戏结束
	GameModeEnd
)
View Source
const (
	// 音频采样率
	SampleRate = 48000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Drawer

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

Drawer 图像绘制工具

func NewDrawer

func NewDrawer() *Drawer

NewDrawer ...

type Game

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

func New

func New() *Game

func (*Game) Draw

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

Draw 核心方法,用于在屏幕上绘制各资源

func (*Game) Layout

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

Layout 核心方法,用于设置窗口大小(全屏模式下无意义)

func (*Game) Update

func (g *Game) Update() error

Update 核心方法,用于更新各资源状态

type GameMode

type GameMode int

Jump to

Keyboard shortcuts

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