Documentation
¶
Index ¶
- func DirFromContext(ctx context.Context) (string, bool)
- func InstallFromGCS(ctx context.Context, bucketName string) error
- func LoadPicture(ctx context.Context, filename string) (pixel.Picture, error)
- func Open(ctx context.Context, filename string) (*os.File, error)
- func WithDir(ctx context.Context, dir string) context.Context
- type ID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallFromGCS ¶
Install fetches all game assets. Returns an error on the first failure.
func LoadPicture ¶
LoadPicture loads a picture asset from the given filename. file is given relative to the root asset cache directory.
Types ¶
type ID ¶
type ID = string
const ( // Adventurer AdventurerAnimationsConfigID ID = "configs/animations/adventurer.json" SpriteAdventurerSheet ID = "sprites/rvros/pixel_adventurer/adventurer-sheet.png" // Props SpriteSphere ID = "sprites/rvros/platformer_tileset/Props/crate.png" // Audio SoundAdventurerJump ID = "sounds/adventurer-jump.mp3" SoundAdventurerLand ID = "sounds/adventurer-land.mp3" // Maps MapDev ID = "maps/surge-map-dev.tmx" SpritePlatformerTileset ID = "sprites/rvros/platformer_tileset/platformer_tiles.png" )
Click to show internal directories.
Click to hide internal directories.