Documentation
¶
Overview ¶
Package game orchestrates client behavior: map input, network reactions, skill commands, local effects, and calls into render, audio, network, world, and ui. Map entity state and movement should live in world; reusable UI composition should live in ui; rendering backend details should live in render.
Index ¶
- type LoginMode
- type Manager
- func (m *Manager) Close()
- func (m *Manager) Draw(screen *render.Frame)
- func (m *Manager) DrawOverlay(screen *render.Frame)
- func (m *Manager) DrawUIOverlay(screen *render.Frame)
- func (m *Manager) FrameSubmitted()
- func (m *Manager) HandleGamepadInput(ctx client.Context, dt float64) input.GamepadCapture
- func (m *Manager) HandleKeyPress(ctx client.Context, code input.KeyCode)
- func (m *Manager) InLogin() bool
- func (m *Manager) PrepareKeyInput(ctx client.Context, code input.KeyCode, mods gpucontext.Modifiers)
- func (m *Manager) PrepareTextInput(ctx client.Context, code input.KeyCode) bool
- func (m *Manager) Update() error
- func (m *Manager) UpdateContext(ctx client.Context)
- type Mode
- type WorldMode
- func (m *WorldMode) Draw(ctx client.Context, screen *render.Frame)
- func (m *WorldMode) DrawInventoryItemIcon(screen *render.Frame, manager *res.Manager, item session.InventoryItem, ...)
- func (m *WorldMode) DrawOverlay(ctx client.Context, screen *render.Frame)
- func (m *WorldMode) DrawSkillIcon(screen *render.Frame, manager *res.Manager, skill session.Skill, ...)
- func (m *WorldMode) DrawUIOverlay(ctx client.Context, screen *render.Frame)
- func (m *WorldMode) EffectCameraYaw(ctx client.Context) float64
- func (m *WorldMode) EffectShake(at time.Time, duration time.Duration)
- func (m *WorldMode) EffectSound(at time.Time, effect effects.Instance, paths ...string)
- func (m *WorldMode) EffectSoundAtPosition(at time.Time, volume, x, y float64, paths ...string)
- func (m *WorldMode) EffectSoundGlobal(at time.Time, paths ...string)
- func (m *WorldMode) EffectSpriteTexture(image *render.Image) *render.Image
- func (m *WorldMode) EffectStarted(ctx client.Context, effect effects.Instance, at time.Time)
- func (m *WorldMode) Enter(ctx client.Context) Mode
- func (m *WorldMode) EquipmentPreviewImage(ctx client.Context, width, height int) image.Image
- func (m *WorldMode) EquipmentPreviewImageForCharacter(ctx client.Context, character session.Character, sex byte, width, height int) image.Image
- func (m *WorldMode) FrameSubmitted()
- func (m *WorldMode) HandleKeyPress(ctx client.Context, code input.KeyCode)
- func (m *WorldMode) ItemInfoIllustrationImage(manager *res.Manager, item session.InventoryItem, width, height int) image.Image
- func (m *WorldMode) KeyboardShortcutsBlocked(ctx client.Context) bool
- func (m *WorldMode) Leave()
- func (m *WorldMode) Name() string
- func (m *WorldMode) PrepareKeyInput(ctx client.Context, code input.KeyCode, mods gpucontext.Modifiers)
- func (m *WorldMode) PrepareTextInput(ctx client.Context, code input.KeyCode) bool
- func (m *WorldMode) SkillIconImage(manager *res.Manager, skill session.Skill) image.Image
- func (m *WorldMode) Update(ctx client.Context) (Mode, error)
- func (m *WorldMode) UseShortcutSkill(ctx client.Context, skill session.Skill) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginMode ¶
func NewCharacterSelectMode ¶
func NewCharacterSelectMode(ctx client.Context, console gameui.ChatConsole) *LoginMode
func NewLoginMode ¶
func NewLoginMode() *LoginMode
func (*LoginMode) DrawOverlay ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Close ¶ added in v0.17.0
func (m *Manager) Close()
Close releases the active mode after the render loop stops, outside any Lua callback.
func (*Manager) DrawOverlay ¶
func (*Manager) DrawUIOverlay ¶
func (*Manager) FrameSubmitted ¶ added in v0.7.0
func (m *Manager) FrameSubmitted()
func (*Manager) HandleGamepadInput ¶ added in v0.16.0
func (*Manager) HandleKeyPress ¶ added in v0.13.0
func (*Manager) InLogin ¶ added in v0.17.0
InLogin can be queried by platform UI threads without reading the live mode.
func (*Manager) PrepareKeyInput ¶ added in v0.13.0
func (*Manager) PrepareTextInput ¶ added in v0.13.0
func (*Manager) UpdateContext ¶
type WorldMode ¶
type WorldMode struct {
// contains filtered or unexported fields
}
func NewWorldMode ¶
func NewWorldMode() *WorldMode
func (*WorldMode) DrawInventoryItemIcon ¶
func (*WorldMode) DrawOverlay ¶
func (*WorldMode) DrawSkillIcon ¶
func (*WorldMode) DrawUIOverlay ¶
func (*WorldMode) EffectCameraYaw ¶ added in v0.22.0
func (*WorldMode) EffectShake ¶ added in v0.22.0
func (*WorldMode) EffectSound ¶ added in v0.22.0
func (*WorldMode) EffectSoundAtPosition ¶ added in v0.22.0
func (*WorldMode) EffectSoundGlobal ¶ added in v0.22.0
func (*WorldMode) EffectSpriteTexture ¶ added in v0.22.0
func (*WorldMode) EffectStarted ¶ added in v0.22.0
func (*WorldMode) EquipmentPreviewImage ¶
func (*WorldMode) EquipmentPreviewImageForCharacter ¶
func (*WorldMode) FrameSubmitted ¶ added in v0.7.0
func (m *WorldMode) FrameSubmitted()
func (*WorldMode) HandleKeyPress ¶ added in v0.13.0
HandleKeyPress gives gameplay input handlers a chance to consume a press before default UI dispatch. Focused chat, forms and modals retain priority.
func (*WorldMode) ItemInfoIllustrationImage ¶
func (*WorldMode) KeyboardShortcutsBlocked ¶
func (*WorldMode) Leave ¶ added in v0.15.0
func (m *WorldMode) Leave()
Leave also covers disconnects, character selection, and failed map loads.
func (*WorldMode) PrepareKeyInput ¶ added in v0.13.0
func (*WorldMode) PrepareTextInput ¶ added in v0.13.0
PrepareTextInput routes ordinary typing to classic chat, or filters the text accompanying active shortcuts. Shortcut actions still run in frame input.
func (*WorldMode) SkillIconImage ¶
Source Files
¶
- actors.go
- battle.go
- camera.go
- chat_shortcuts.go
- companion.go
- console_messages.go
- cursor.go
- doc.go
- emotions.go
- equipment_view.go
- hotkey_state.go
- inventory_defs.go
- inventory_state.go
- items.go
- keyboard.go
- less_effects.go
- login.go
- manager.go
- map_load_error.go
- movement.go
- npc.go
- parameter_changes.go
- pet.go
- pvp.go
- quests.go
- script.go
- server_information.go
- session_state_updates.go
- sfx.go
- skills.go
- social.go
- song_talk.go
- ui_actions.go
- ui_assets.go
- visual_bridge.go
- window_shortcuts.go
- world.go
- world_map.go
- world_packets.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package actors manages actor appearance, animation, movement and rendering.
|
Package actors manages actor appearance, animation, movement and rendering. |
|
Package battle manages combat status, damage numbers and combat overlays.
|
Package battle manages combat status, damage numbers and combat overlays. |
|
Package companion manages homunculus and mercenary state, commands, and Lua AI.
|
Package companion manages homunculus and mercenary state, commands, and Lua AI. |
|
internal
|
|
|
Package npc manages NPC dialogs, shops, illustrations and script progress.
|
Package npc manages NPC dialogs, shops, illustrations and script progress. |
|
Package pet manages pet capture, care, commands and presentation.
|
Package pet manages pet capture, care, commands and presentation. |
|
Package social manages interactions between players.
|
Package social manages interactions between players. |