internal

package
v0.0.77 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	UI = iota
	Game
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCommand

type BuildCommand struct {
	Dev        string `json:"dev"`
	Production string `json:"prod"`
}

type Builder

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

func NewBuilder

func NewBuilder(root string) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build() error

func (*Builder) BuildGame

func (b *Builder) BuildGame() ([]byte, []byte, error)

func (*Builder) BuildProd

func (b *Builder) BuildProd() error

func (*Builder) BuildUI

func (b *Builder) BuildUI() ([]byte, []byte, error)

func (*Builder) Clean

func (b *Builder) Clean() error

func (*Builder) Manifest

func (b *Builder) Manifest() (*ManifestV1, error)

func (*Builder) WatchedFiles

func (b *Builder) WatchedFiles() ([]string, error)

type GameConfig

type GameConfig struct {
	Root         string       `json:"root"`
	BuildCommand BuildCommand `json:"build"`
	WatchPaths   []string     `json:"watchPaths"`
	OutputFile   string       `json:"out"`
}

type ManifestV1

type ManifestV1 struct {
	MinimumPlayers int        `json:"minPlayers"`
	MaximumPlayers int        `json:"maxPlayers"`
	UI             UIConfig   `json:"ui"`
	Game           GameConfig `json:"game"`
}

type Server

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

func NewServer

func NewServer(gameRoot string, manifest *ManifestV1, port int) (*Server, error)

func (*Server) BuildError

func (s *Server) BuildError(t int, o, e string)

func (*Server) Reload

func (s *Server) Reload(t int)

func (*Server) Serve

func (s *Server) Serve() error

type UIConfig

type UIConfig struct {
	Root            string       `json:"root"`
	BuildCommand    BuildCommand `json:"build"`
	WatchPaths      []string     `json:"watchPaths"`
	OutputDirectory string       `json:"outDir"`
}

Jump to

Keyboard shortcuts

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