component

package
v0.0.0-...-591fb6e Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOBBY string = "/"
	ROOM  string = "/room"
)

Variables

This section is empty.

Functions

func Init

func Init(store jui.Store)

Types

type Default

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

func NewDefaultComponent

func NewDefaultComponent(store jui.Store) *Default

func (*Default) DidMount

func (d *Default) DidMount()

func (*Default) DidUnmount

func (d *Default) DidUnmount()

func (*Default) GetGrid

func (d *Default) GetGrid() *ui.Grid

func (*Default) HandleServerEvent

func (d *Default) HandleServerEvent(*cpb.BroadcastMsg) bool

func (*Default) HandleUIEvent

func (d *Default) HandleUIEvent(ui.Event) bool

func (*Default) Reset

func (d *Default) Reset() error

func (*Default) TimeTick

func (d *Default) TimeTick()

the standard timetick is called every 0.05 sec

func (*Default) WillMount

func (d *Default) WillMount(interface{})

lifecycle

func (*Default) WillUnmount

func (d *Default) WillUnmount()

type Lobby

type Lobby struct {
	Default
	// contains filtered or unexported fields
}

func NewLobby

func NewLobby(d *Default) *Lobby

func (*Lobby) HandleUIEvent

func (lc *Lobby) HandleUIEvent(e ui.Event) bool

func (*Lobby) Reset

func (lc *Lobby) Reset() error

func (*Lobby) WillMount

func (lc *Lobby) WillMount(interface{})

lifecycle

type Room

type Room struct {
	Default
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(d *Default) *Room

func (*Room) HandleServerEvent

func (room *Room) HandleServerEvent(*cpb.BroadcastMsg) bool

func (*Room) HandleUIEvent

func (room *Room) HandleUIEvent(e ui.Event) bool

func (*Room) Reset

func (room *Room) Reset() error

func (*Room) WillMount

func (room *Room) WillMount(interface{})

lifecycle

func (*Room) WillUnmount

func (room *Room) WillUnmount()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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