model

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationActiveViewChangedEvent

type ApplicationActiveViewChangedEvent struct {
	ActiveView ViewName
}

type ApplicationModel added in v0.22.0

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

func NewApplicationModel added in v0.22.0

func NewApplicationModel(eventBus *mvc.EventBus) *ApplicationModel

func (*ApplicationModel) ActiveView added in v0.22.0

func (a *ApplicationModel) ActiveView() ViewName

func (*ApplicationModel) SetActiveView added in v0.22.0

func (a *ApplicationModel) SetActiveView(view ViewName)

type ErrorModel added in v0.22.0

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

func NewErrorModel added in v0.22.0

func NewErrorModel() *ErrorModel

func (*ErrorModel) Error added in v0.22.0

func (e *ErrorModel) Error() error

func (*ErrorModel) SetError added in v0.22.0

func (e *ErrorModel) SetError(err error)

type HomeModel added in v0.22.0

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

func NewHomeModel added in v0.22.0

func NewHomeModel() *HomeModel

func (*HomeModel) Data added in v0.22.0

func (h *HomeModel) Data() *data.HomeData

func (*HomeModel) Scene added in v0.22.0

func (h *HomeModel) Scene() *HomeScene

func (*HomeModel) SetData added in v0.22.0

func (h *HomeModel) SetData(data *data.HomeData)

func (*HomeModel) SetScene added in v0.22.0

func (h *HomeModel) SetScene(scene *HomeScene)

type HomeScene added in v0.22.0

type HomeScene struct {
	Scene *game.Scene
}

type LoadingModel added in v0.22.0

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

func NewLoadingModel added in v0.22.0

func NewLoadingModel() *LoadingModel

func (*LoadingModel) SetState added in v0.22.0

func (l *LoadingModel) SetState(state LoadingState)

func (*LoadingModel) State added in v0.22.0

func (l *LoadingModel) State() LoadingState

type LoadingPromise added in v0.22.0

type LoadingPromise interface {
	OnSuccess(func())
	OnError(func())
}

func NewLoadingPromise added in v0.22.0

func NewLoadingPromise[T any](worker game.Worker, promise async.Promise[T], onSuccess func(T), onError func(error)) LoadingPromise

type LoadingState added in v0.22.0

type LoadingState struct {
	Promise         LoadingPromise
	SuccessViewName ViewName
	ErrorViewName   ViewName
}

type PlayModel added in v0.22.0

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

func NewPlayModel added in v0.22.0

func NewPlayModel() *PlayModel

func (*PlayModel) Data added in v0.22.0

func (h *PlayModel) Data() *data.PlayData

func (*PlayModel) Scene added in v0.22.0

func (h *PlayModel) Scene() *PlayScene

func (*PlayModel) SetData added in v0.22.0

func (h *PlayModel) SetData(data *data.PlayData)

func (*PlayModel) SetScene added in v0.22.0

func (h *PlayModel) SetScene(scene *PlayScene)

type PlayScene added in v0.22.0

type PlayScene struct {
	Scene *game.Scene
}

type ViewName

type ViewName = string
const (
	ViewNameIntro    ViewName = "intro"
	ViewNameError    ViewName = "error"
	ViewNameLoading  ViewName = "loading"
	ViewNameLicenses ViewName = "licenses"
	ViewNameHome     ViewName = "home"
	ViewNamePlay     ViewName = "play"
)

Jump to

Keyboard shortcuts

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