Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Zoom is the zoom scale of the game viewport. Zoom = 1.0 // InterpolationOffset is how far back in time we want to interpolate. InterpolationOffset = 150 // ms - currently 3x the server tick rate (50ms) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSceneOptions ¶
type BaseScene ¶
type BaseScene struct {
// contains filtered or unexported fields
}
func NewBaseScene ¶
func NewBaseScene(root objects.GameObject) *BaseScene
func (*BaseScene) GetRoot ¶
func (s *BaseScene) GetRoot() objects.GameObject
type CameraViewport ¶
type CharacterSelectionScene ¶
type CharacterSelectionScene struct {
*BaseScene
// contains filtered or unexported fields
}
func (*CharacterSelectionScene) Draw ¶
func (s *CharacterSelectionScene) Draw(screen *ebiten.Image)
func (*CharacterSelectionScene) Init ¶
func (s *CharacterSelectionScene) Init() error
func (*CharacterSelectionScene) Update ¶
func (s *CharacterSelectionScene) Update() error
type CharacterSelectionSceneOpts ¶
type CharacterSelectionSceneOpts struct {
// FetchCharacters is a function that fetches the characters that the user can select from.
FetchCharacters func() ([]*models.Character, error)
// CreateCharacter is a function that creates a new character.
CreateCharacter func(name string) (*models.Character, error)
// DeleteCharacter is a function that deletes a character.
DeleteCharacter func(characterID int32) error
// OnSelectCharacter is a callback that is called when a character is selected.
OnSelectCharacter func(characterID int32) error
}
type ErrorScene ¶
type ErrorScene struct {
*BaseScene
}
type GameOverScene ¶
type GameOverScene struct {
*BaseScene
}
type Scene ¶
type Scene interface {
objects.Lifecycle
// Scene specific methods
GetRoot() objects.GameObject
}
func NewAuthScene ¶
func NewAuthScene(opts AuthSceneOptions) (Scene, error)
func NewCharacterSelectionScene ¶
func NewCharacterSelectionScene(opts CharacterSelectionSceneOpts) (Scene, error)
func NewErrorScene ¶
func NewGameOverScene ¶
func NewGameScene ¶
func NewGameScene(networkManager *network.NetworkManager) (Scene, error)
type ServerNPCUpdateBuffer ¶
type ServerNPCUpdateBuffer struct {
LastStateReceived int64
States []*messages.ServerNPCUpdate
}
type ServerPlayerUpdateBuffer ¶
type ServerPlayerUpdateBuffer struct {
LastUpdateReceived int64
Updates []*messages.ServerPlayerUpdate
}
Click to show internal directories.
Click to hide internal directories.