model

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveViewChangedEvent added in v0.6.0

type ActiveViewChangedEvent struct{}

type Application

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

func NewApplication

func NewApplication(eventBus *mvc.EventBus) *Application

func (*Application) ActiveView

func (a *Application) ActiveView() ViewName

func (*Application) SetActiveView

func (a *Application) SetActiveView(view ViewName)

type ControllerChangedEvent added in v0.6.0

type ControllerChangedEvent struct{}

type EnvironmentChangedEvent added in v0.6.0

type EnvironmentChangedEvent struct{}

type Home added in v0.5.0

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

func NewHome added in v0.6.0

func NewHome(eventBus *mvc.EventBus) *Home

func (*Home) Controller added in v0.5.0

func (h *Home) Controller() data.Controller

func (*Home) Data added in v0.5.0

func (h *Home) Data() async.Promise[*data.HomeData]

func (*Home) Environment added in v0.5.0

func (h *Home) Environment() data.Environment

func (*Home) Scene added in v0.5.0

func (h *Home) Scene() *HomeScene

func (*Home) SetController added in v0.5.0

func (h *Home) SetController(controller data.Controller)

func (*Home) SetData added in v0.5.0

func (h *Home) SetData(sceneData async.Promise[*data.HomeData])

func (*Home) SetEnvironment added in v0.5.0

func (h *Home) SetEnvironment(environment data.Environment)

func (*Home) SetScene added in v0.5.0

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

type HomeScene added in v0.5.0

type HomeScene struct {
	Scene *game.Scene

	DaySky              *graphics.Sky
	DayAmbientLight     *graphics.AmbientLight
	DayDirectionalLight *graphics.DirectionalLight

	NightSky          *graphics.Sky
	NightAmbientLight *graphics.AmbientLight
	NightSpotLight    *graphics.SpotLight
}

type Loading added in v0.5.0

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

func NewLoading added in v0.6.0

func NewLoading(eventBus *mvc.EventBus) *Loading

func (*Loading) NextViewName added in v0.5.0

func (l *Loading) NextViewName() ViewName

func (*Loading) Promise added in v0.5.0

func (l *Loading) Promise() LoadingPromise

func (*Loading) SetNextViewName added in v0.5.0

func (l *Loading) SetNextViewName(name ViewName)

func (*Loading) SetPromise added in v0.5.0

func (l *Loading) SetPromise(promise LoadingPromise)

type LoadingPromise added in v0.5.0

type LoadingPromise interface {
	OnReady(func())
}

func ToLoadingPromise added in v0.6.0

func ToLoadingPromise[T any](promise async.Promise[T]) LoadingPromise

type Play added in v0.5.0

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

func NewPlay added in v0.6.0

func NewPlay(eventBus *mvc.EventBus) *Play

func (*Play) Data added in v0.5.0

func (h *Play) Data() async.Promise[*data.PlayData]

func (*Play) SetData added in v0.5.0

func (h *Play) SetData(sceneData async.Promise[*data.PlayData])

type ViewName

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

Jump to

Keyboard shortcuts

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