Documentation ¶
Index ¶
- Constants
- Variables
- func Face(size int) font.Face
- func IsEnterJustPressed() bool
- func IsEscapeJustPressed() bool
- func NewBackgroundBrightnessKeyHandler(cfg *Config, asset *Asset) func() bool
- func NewBackgroundDrawer(cfg *Config, asset *Asset, fsys fs.FS, name string) func(draws.Image)
- func NewDebugPrintKeyHandler(cfg *Config, asset *Asset) func() bool
- func NewModeKeyHandler(cfg *Config, asset *Asset) func() bool
- func NewMusicOffsetKeyHandler(cfg *Config, asset *Asset) func() bool
- func NewMusicVolumeKeyHandler(cfg *Config, asset *Asset) func() bool
- func NewSoundVolumeKeyHandler(cfg *Config, asset *Asset) func() bool
- func NewSpeedScaleKeyHandler(cfg *Config, asset *Asset, _mode int) func() bool
- func NewSubModeKeyHandler(cfg *Config, asset *Asset) func() bool
- func SetTPS(tps float64)
- type Asset
- type Config
- type PlayArgs
- type Scene
Constants ¶
View Source
const ( CursorBase = iota CursorAdditive CursorTrail )
Variables ¶
View Source
var Faces = make(map[int]font.Face)
View Source
var LeftRightKeys = [2]input.Key{input.KeyArrowLeft, input.KeyArrowRight}
View Source
var UpDownKeys = [2]input.Key{input.KeyArrowUp, input.KeyArrowDown}
Functions ¶
func IsEnterJustPressed ¶ added in v0.6.0
func IsEnterJustPressed() bool
func IsEscapeJustPressed ¶ added in v0.6.0
func IsEscapeJustPressed() bool
func NewBackgroundBrightnessKeyHandler ¶ added in v0.6.0
func NewBackgroundDrawer ¶ added in v0.6.0
asset.go: functions that load assets from fs.FS. draw.go: functions that draw.
func NewDebugPrintKeyHandler ¶ added in v0.6.0
func NewModeKeyHandler ¶ added in v0.6.0
func NewMusicOffsetKeyHandler ¶ added in v0.6.0
func NewMusicVolumeKeyHandler ¶ added in v0.6.0
func NewSoundVolumeKeyHandler ¶ added in v0.6.0
func NewSpeedScaleKeyHandler ¶ added in v0.6.0
func NewSubModeKeyHandler ¶ added in v0.6.0
Types ¶
type Asset ¶ added in v0.6.0
type Asset struct { CursorSprites [3]draws.Sprite DefaultBackgroundSprite draws.Sprite BoxMaskSprite draws.Sprite ClearSprite draws.Sprite IntroSprite draws.Sprite LoadingSprite draws.Sprite SearchBoxSprite draws.Sprite EnterSound audios.SoundPlayer SwipeSoundPod audios.SoundPlayer TapSoundPod audios.SoundPlayer ToggleSounds [2]audios.SoundPlayer TransitionSounds [2]audios.SoundPlayer // Each key count has different asset in piano mode. PianoAssets map[int]*piano.Asset }
Asset is previously known as Skin.
type Config ¶ added in v0.6.0
type Config struct { MusicRoots []string ScreenSize draws.Vector2 MusicVolume float64 SoundVolume float64 MusicOffset int32 BackgroundBrightness float64 DebugPrint bool Replay bool CursorSpriteScale float64 ChartTreeNodeWidth float64 ChartTreeNodeHeight float64 ChartTreeNodeShrink float64 // Nodes are not focused will be shrinked. SearchBoxWidth float64 SearchBoxHeight float64 ClearSpriteScale float64 Mode int SubMode int PianoConfig *piano.Config }
scene.Config and scene.Asset contains all the configuration and assets that are used in the game. They are passed to other scenes. There should not be any additional configuration or assets in other scenes.
func (Config) ChartTreeNodeCount ¶ added in v0.6.0
func (Config) DebugString ¶ added in v0.6.0
func (*Config) NormalizeMusicRoots ¶ added in v0.6.0
func (c *Config) NormalizeMusicRoots()
Click to show internal directories.
Click to hide internal directories.