Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State interface { OnUpdate() error OnDraw(screen *ebiten.Image) OnEnter() OnLeave() }
State is a interface for 5 essential functions for state transition
func MakeState ¶
func MakeState(newState fsm.State, m *fsm.Machine, world *goecs.World, logicChannel chan db.GameMessage, uiChannel chan db.GameMessage) State
MakeState make
type StateLoading ¶
type StateLoading struct {
// contains filtered or unexported fields
}
StateLoading implements State interface and for loading scene
func NewStateLoading ¶
func NewStateLoading(m *fsm.Machine, world *goecs.World, lch chan db.GameMessage, uch chan db.GameMessage) *StateLoading
NewStateLoading is a constructor
func (*StateLoading) OnDraw ¶
func (s *StateLoading) OnDraw(screen *ebiten.Image)
OnDraw for draw scene
func (*StateLoading) OnEnter ¶
func (s *StateLoading) OnEnter()
OnEnter for pre-process before entering state
func (*StateLoading) OnLeave ¶
func (s *StateLoading) OnLeave()
OnLeave for post-process after leaving state
type StateTitle ¶
type StateTitle struct {
// contains filtered or unexported fields
}
StateTitle implements State interface and for title menu
func NewStateTitle ¶
func NewStateTitle(m *fsm.Machine, world *goecs.World, lch chan db.GameMessage, uch chan db.GameMessage) *StateTitle
NewStateTitle is a constructor
func (*StateTitle) OnEnter ¶
func (s *StateTitle) OnEnter()
OnEnter for pre-process before entering state
func (*StateTitle) OnLeave ¶
func (s *StateTitle) OnLeave()
OnLeave for post-process after leaving state
Click to show internal directories.
Click to hide internal directories.