Documentation
¶
Index ¶
- func ToFloat64(a int, b int) (float64, float64)
- type Connect
- func (state *Connect) Begin(ctx ifs.RunContext) error
- func (state *Connect) Connect(ctx ifs.RunContext) error
- func (state *Connect) Draw(ctx ifs.DrawContext)
- func (state *Connect) End() (interface{}, error)
- func (state *Connect) Leave() error
- func (state *Connect) Return(interface{}) error
- func (state *Connect) Update(ctx ifs.RunContext) error
- type Create
- type Data
- type Game
- func (state *Game) Begin(ctx ifs.RunContext) error
- func (state *Game) Character() *game.Character
- func (state *Game) Draw(ctx ifs.DrawContext)
- func (state *Game) End() (interface{}, error)
- func (state *Game) Leave() error
- func (state *Game) Return(interface{}) error
- func (state *Game) Update(ctx ifs.RunContext) error
- type Login
- type Server
- type Worlds
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connect ¶
type Connect struct {
// contains filtered or unexported fields
}
Connect is a state that manages and watches a connection to a morogue server. It should be noted that this doesn't sit in the state machine, but rather runs directly in the app struct. FIXME: At the moment, this doesn't handle reconnection and all that. What it should do is when a connection is lost, to pop the entire state machine, then attempt to connect and push the login state upon success.
func (*Connect) Draw ¶
func (state *Connect) Draw(ctx ifs.DrawContext)
type Create ¶
type Create struct {
// contains filtered or unexported fields
}
Create is a rather massive and messy state that controls character selection, creation, and deletion. Popping Create should return to the Login state.
func NewCreate ¶
func NewCreate(connection net.Connection, msgCh chan net.Message) *Create
NewCreate creates a new Create instance.
func (*Create) Draw ¶
func (state *Create) Draw(ctx ifs.DrawContext)
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func (*Data) ArchetypeImage ¶
func (*Data) EnsureImage ¶
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game represents the running game in the world.
func (*Game) Draw ¶
func (state *Game) Draw(ctx ifs.DrawContext)
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
Login is the first state when connecting to a server. It provides the ability to login or register an account with the server.
func NewLogin ¶
func NewLogin(connection net.Connection, msgCh chan net.Message) *Login
NewLogin creates a new Login instance.
func (*Login) Draw ¶
func (state *Login) Draw(ctx ifs.DrawContext)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the first state when connecting to a server. It provides the ability to login or register an account with the server.
func NewServer ¶
func NewServer(mode *string, connection *net.Connection, connChan *chan error) *Server
NewServer creates a new Server instance.
func (*Server) Draw ¶
func (state *Server) Draw(ctx ifs.DrawContext)
type Worlds ¶
type Worlds struct {
// contains filtered or unexported fields
}
Worlds is the state for joining and creating worlds. It displays a list of worlds acquired from net.WorldsMessage and has a section for specifying world options and thereafter sending a net.CreateWorldMessage. Popping Worlds should return to the Create state.
func (*Worlds) Draw ¶
func (state *Worlds) Draw(ctx ifs.DrawContext)