Documentation ¶
Index ¶
- Variables
- type Aborter
- type Game
- func (g *Game) AbortForInterpreter(id consts.InterpreterID)
- func (g *Game) ActivateHint(id int)
- func (g *Game) AddItem(id int)
- func (g *Game) ApplyShake(geo *ebiten.GeoM)
- func (g *Game) ApplyTintColor(c *ebiten.ColorM)
- func (g *Game) Background(mapID, roomID int) (string, bool)
- func (g *Game) CanWindowProceed(interpreterID consts.InterpreterID) bool
- func (g *Game) Character(mapID, roomID, eventID int) *character.Character
- func (g *Game) ChosenWindowIndex() int
- func (g *Game) Clear()
- func (g *Game) CloseAllWindows()
- func (g *Game) CompleteHint(id int)
- func (g *Game) CurrentEvents() []*data.Event
- func (g *Game) DecodeMsgpack(dec *msgpack.Decoder) error
- func (g *Game) DrawPictures(screen *ebiten.Image, offsetX, offsetY int, priority data.PicturePriorityType)
- func (g *Game) DrawScreen(screenImage *ebiten.Image)
- func (g *Game) DrawWeather(screen *ebiten.Image)
- func (g *Game) DrawWindows(screen *ebiten.Image, offsetX, offsetY, windowOffsetY int)
- func (g *Game) EncodeMsgpack(enc *msgpack.Encoder) error
- func (g *Game) ExecutableEventAtPlayer() *character.Character
- func (g *Game) FadeIn(time int)
- func (g *Game) FadeOut(time int)
- func (g *Game) Foreground(mapID, roomID int) (string, bool)
- func (g *Game) GenerateInterpreterID() consts.InterpreterID
- func (g *Game) GetItemValueString(sceneManager *scene.Manager, itemID int) string
- func (g *Game) GetTableValueString(sceneManager *scene.Manager, tableName string, recordID int, attrName string) string
- func (g *Game) HasChosenWindowIndex() bool
- func (g *Game) HideInventory()
- func (g *Game) HideMinigame()
- func (g *Game) InitMinigame(id, reqScore, score int)
- func (g *Game) InsertItemBefore(targetItemID int, insertItemID int)
- func (g *Game) InterfaceToTableValue(sceneManager *scene.Manager, v interface{}) interface{}
- func (g *Game) InventoryVisible() bool
- func (g *Game) IsAutoSaveEnabled() bool
- func (g *Game) IsChangingTint() bool
- func (g *Game) IsPlayerControlEnabled() bool
- func (g *Game) IsScreenFadedOut() bool
- func (g *Game) IsScreenFading() bool
- func (g *Game) IsShaking() bool
- func (g *Game) IsWindowAnimating(interpreterID consts.InterpreterID) bool
- func (g *Game) IsWindowBusy() bool
- func (g *Game) Items() *items.Items
- func (g *Game) Map() *Map
- func (g *Game) MapPassableAt(through bool, x, y int, ignoreCharacters bool) bool
- func (g *Game) MeetsCondition(cond *data.Condition, eventID int) (bool, error)
- func (g *Game) Minigame() *Minigame
- func (g *Game) PauseHint(id int)
- func (g *Game) PlayerSpeed() data.Speed
- func (g *Game) RandomValue(min, max int) int
- func (g *Game) RealChoiceIndex(sceneManager *scene.Manager, index int, eventID int, ...) int
- func (g *Game) RefreshEvents() error
- func (g *Game) RemoveItem(id int)
- func (g *Game) RequestRewardedAds(requestID int, sceneManager *scene.Manager, forceAds bool) bool
- func (g *Game) RequestSave(requestID int, sceneManager *scene.Manager)
- func (g *Game) RequestSavePermanentMinigame(requestID int, sceneManager *scene.Manager, id, score int, lastActiveAt int64) bool
- func (g *Game) RequestSavePermanentVariable(requestID int, sceneManager *scene.Manager, ...) bool
- func (g *Game) SetAutoSaveEnabled(enabled bool)
- func (g *Game) SetBGM(bgm data.BGM)
- func (g *Game) SetBackground(mapID, roomID int, image string)
- func (g *Game) SetEventItem(id int)
- func (g *Game) SetFadeColor(clr color.Color)
- func (g *Game) SetForeground(mapID, roomID int, image string)
- func (g *Game) SetPlayerControlEnabled(enabled bool)
- func (g *Game) SetPlayerDir(dir data.Dir)
- func (g *Game) SetPlayerSpeed(value data.Speed)
- func (g *Game) SetPrices(p map[string]string)
- func (g *Game) SetRandomForTesting(r Rand)
- func (g *Game) SetSelfSwitchValue(eventID int, id int, value bool)
- func (g *Game) SetSwitchRefValue(id int, value bool)
- func (g *Game) SetSwitchValue(id int, value bool)
- func (g *Game) SetVariable(sceneManager *scene.Manager, variableID int, op data.SetVariableOp, ...) error
- func (g *Game) SetVariableRef(sceneManager *scene.Manager, variableID int, op data.SetVariableOp, ...) error
- func (g *Game) SetVariableValue(id int, value int64)
- func (g *Game) SetWeather(weatherType data.WeatherType)
- func (g *Game) ShakeStartGameButton()
- func (g *Game) ShouldShowCredits() bool
- func (g *Game) ShouldShowCreditsCloseButton() bool
- func (g *Game) ShowBalloon(sceneManager *scene.Manager, interpreterID consts.InterpreterID, ...) bool
- func (g *Game) ShowChoices(sceneManager *scene.Manager, interpreterID consts.InterpreterID, eventID int, ...)
- func (g *Game) ShowCredits(shouldShowCreditsCloseButton bool)
- func (g *Game) ShowInventory(group int, wait bool, cancelable bool)
- func (g *Game) ShowMessage(sceneManager *scene.Manager, interpreterID consts.InterpreterID, eventID int, ...)
- func (g *Game) ShowMinigame(lastActiveAt int64)
- func (g *Game) ShowedCredits()
- func (g *Game) StartCombineCommands(combine *data.Combine)
- func (g *Game) StartItemCommands(itemID int)
- func (g *Game) StartShaking(power, speed, count int, dir data.ShakeDirection)
- func (g *Game) StartTint(red, green, blue, gray float64, time int)
- func (g *Game) StopShaking()
- func (g *Game) SwitchValue(id int) int64
- func (g *Game) TransferPlayerImmediately(roomID, x, y int, interpreter InterpreterInterface)
- func (g *Game) Update(sceneManager *scene.Manager) error
- func (g *Game) UpdatePictureTouch(offsetY int) bool
- func (g *Game) VariableValue(id int) int64
- func (g *Game) ZeroTint() bool
- type Interpreter
- func (i *Interpreter) Abort(aborter Aborter)
- func (i *Interpreter) DecodeMsgpack(dec *msgpack.Decoder) error
- func (i *Interpreter) EncodeMsgpack(enc *msgpack.Encoder) error
- func (i *Interpreter) EventID() int
- func (i *Interpreter) ID() consts.InterpreterID
- func (i *Interpreter) IsExecuting() bool
- func (i *Interpreter) MapID() int
- func (i *Interpreter) PageIndex() int
- func (i *Interpreter) PageRoute() bool
- func (i *Interpreter) Parallel() bool
- func (i *Interpreter) RoomID() int
- func (i *Interpreter) Route() bool
- func (i *Interpreter) Sub() InterpreterInterface
- func (i *Interpreter) Update(sceneManager *scene.Manager, gameState *Game) error
- type InterpreterIDGenerator
- type InterpreterInterface
- type Map
- func (m *Map) Background(gameState *Game) string
- func (m *Map) CurrentRoom() *data.Room
- func (m *Map) DecodeMsgpack(dec *msgpack.Decoder) error
- func (m *Map) DrawCharacters(screen *ebiten.Image, priority data.Priority, offsetX, offsetY int)
- func (m *Map) EncodeMsgpack(enc *msgpack.Encoder) error
- func (m *Map) FindImage(imageID int) *ebiten.Image
- func (m *Map) FindImageName(imageID int) string
- func (m *Map) FinishPlayerMovingByUserInput()
- func (m *Map) FocusingCharacter() *character.Character
- func (m *Map) Foreground(gameState *Game) string
- func (m *Map) GetPressedPosition() (int, int)
- func (m *Map) IsBlockingEventExecuting() bool
- func (m *Map) IsPlayerMovingByUserInput() bool
- func (m *Map) Passable(through bool, x, y int, ignoreCharacters bool) bool
- func (m *Map) SetPressedPosition(x, y int)
- func (m *Map) StartCombineCommands(gameState *Game, combine *data.Combine)
- func (m *Map) StartItemCommands(gameState *Game, itemID int)
- func (m *Map) TryMovePlayerByUserInput(sceneManager *scene.Manager, gameState *Game, x, y int) bool
- func (m *Map) TryRunDirectEvent(gameState *Game, x, y int) bool
- func (m *Map) Update(sceneManager *scene.Manager, gameState *Game) error
- type Minigame
- type Rand
- type Screen
- func (s *Screen) ApplyShake(g *ebiten.GeoM)
- func (s *Screen) ApplyTintColor(c *ebiten.ColorM)
- func (s *Screen) DecodeMsgpack(dec *msgpack.Decoder) error
- func (s *Screen) Draw(img *ebiten.Image)
- func (s *Screen) EncodeMsgpack(enc *msgpack.Encoder) error
- func (s *Screen) Update()
- func (s *Screen) ZeroTint() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var GoToTitle = errors.New("go to title")
Functions ¶
This section is empty.
Types ¶
type Aborter ¶
type Aborter interface {
AbortForInterpreter(consts.InterpreterID)
}
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func NewTitleGame ¶
func (*Game) AbortForInterpreter ¶
func (g *Game) AbortForInterpreter(id consts.InterpreterID)
func (*Game) ActivateHint ¶
func (*Game) ApplyShake ¶
func (*Game) ApplyTintColor ¶
func (*Game) CanWindowProceed ¶
func (g *Game) CanWindowProceed(interpreterID consts.InterpreterID) bool
func (*Game) ChosenWindowIndex ¶
func (*Game) CloseAllWindows ¶
func (g *Game) CloseAllWindows()
func (*Game) CompleteHint ¶
func (*Game) CurrentEvents ¶
func (*Game) DrawPictures ¶
func (*Game) DrawScreen ¶
func (*Game) DrawWeather ¶
func (*Game) DrawWindows ¶
func (*Game) ExecutableEventAtPlayer ¶
func (*Game) GenerateInterpreterID ¶
func (g *Game) GenerateInterpreterID() consts.InterpreterID
func (*Game) GetItemValueString ¶
func (*Game) GetTableValueString ¶
func (*Game) HasChosenWindowIndex ¶
func (*Game) HideInventory ¶
func (g *Game) HideInventory()
func (*Game) HideMinigame ¶
func (g *Game) HideMinigame()
func (*Game) InitMinigame ¶
func (*Game) InsertItemBefore ¶
func (*Game) InterfaceToTableValue ¶
func (*Game) InventoryVisible ¶
func (*Game) IsAutoSaveEnabled ¶
func (*Game) IsChangingTint ¶
func (*Game) IsPlayerControlEnabled ¶
func (*Game) IsScreenFadedOut ¶
func (*Game) IsScreenFading ¶
func (*Game) IsWindowAnimating ¶
func (g *Game) IsWindowAnimating(interpreterID consts.InterpreterID) bool
func (*Game) IsWindowBusy ¶
func (*Game) MapPassableAt ¶
func (*Game) MeetsCondition ¶
func (*Game) PlayerSpeed ¶
func (*Game) RandomValue ¶
func (*Game) RealChoiceIndex ¶
func (*Game) RefreshEvents ¶
func (*Game) RemoveItem ¶
func (*Game) RequestRewardedAds ¶
func (*Game) RequestSave ¶
RequestSave requests to save the progress to the platform.
func (*Game) RequestSavePermanentMinigame ¶
func (*Game) RequestSavePermanentVariable ¶
func (*Game) SetAutoSaveEnabled ¶
func (*Game) SetBackground ¶
func (*Game) SetEventItem ¶
func (*Game) SetFadeColor ¶
func (*Game) SetForeground ¶
func (*Game) SetPlayerControlEnabled ¶
func (*Game) SetPlayerDir ¶
func (*Game) SetPlayerSpeed ¶
func (*Game) SetRandomForTesting ¶
func (*Game) SetSelfSwitchValue ¶
func (*Game) SetSwitchRefValue ¶
func (*Game) SetSwitchValue ¶
func (*Game) SetVariable ¶
func (g *Game) SetVariable(sceneManager *scene.Manager, variableID int, op data.SetVariableOp, valueType data.SetVariableValueType, value interface{}, mapID, roomID, eventID int) error
func (*Game) SetVariableRef ¶
func (g *Game) SetVariableRef(sceneManager *scene.Manager, variableID int, op data.SetVariableOp, valueType data.SetVariableValueType, value interface{}, mapID, roomID, eventID int) error
func (*Game) SetVariableValue ¶
func (*Game) SetWeather ¶
func (g *Game) SetWeather(weatherType data.WeatherType)
func (*Game) ShakeStartGameButton ¶
func (g *Game) ShakeStartGameButton()
func (*Game) ShouldShowCredits ¶
func (*Game) ShouldShowCreditsCloseButton ¶
func (*Game) ShowBalloon ¶
func (g *Game) ShowBalloon(sceneManager *scene.Manager, interpreterID consts.InterpreterID, mapID, roomID, eventID int, contentID data.UUID, balloonType data.BalloonType, messageStyle *data.MessageStyle) bool
func (*Game) ShowChoices ¶
func (g *Game) ShowChoices(sceneManager *scene.Manager, interpreterID consts.InterpreterID, eventID int, choiceIDs []data.UUID, conditions []*data.ChoiceCondition)
func (*Game) ShowCredits ¶
func (*Game) ShowMessage ¶
func (g *Game) ShowMessage(sceneManager *scene.Manager, interpreterID consts.InterpreterID, eventID int, contentID data.UUID, background data.MessageBackground, positionType data.MessagePositionType, textAlign data.TextAlign, messageStyle *data.MessageStyle)
func (*Game) ShowMinigame ¶
func (*Game) ShowedCredits ¶
func (g *Game) ShowedCredits()
func (*Game) StartCombineCommands ¶
func (*Game) StartItemCommands ¶
func (*Game) StartShaking ¶
func (g *Game) StartShaking(power, speed, count int, dir data.ShakeDirection)
func (*Game) StopShaking ¶
func (g *Game) StopShaking()
func (*Game) SwitchValue ¶
func (*Game) TransferPlayerImmediately ¶
func (g *Game) TransferPlayerImmediately(roomID, x, y int, interpreter InterpreterInterface)
func (*Game) UpdatePictureTouch ¶
UpdatePictureTouch updates the picture touch states and reports whether one of the pictures is touched.
func (*Game) VariableValue ¶
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
func NewInterpreter ¶
func NewInterpreter(idGen InterpreterIDGenerator, mapID, roomID, eventID, pageIndex int, commands []*data.Command) *Interpreter
func (*Interpreter) Abort ¶
func (i *Interpreter) Abort(aborter Aborter)
Abort aborts the interpreter. If Abort is called, the interpreter terminates after the current command finishes.
Abort is typically called when transferring the player.
func (*Interpreter) DecodeMsgpack ¶
func (i *Interpreter) DecodeMsgpack(dec *msgpack.Decoder) error
func (*Interpreter) EncodeMsgpack ¶
func (i *Interpreter) EncodeMsgpack(enc *msgpack.Encoder) error
func (*Interpreter) EventID ¶
func (i *Interpreter) EventID() int
func (*Interpreter) ID ¶
func (i *Interpreter) ID() consts.InterpreterID
func (*Interpreter) IsExecuting ¶
func (i *Interpreter) IsExecuting() bool
func (*Interpreter) MapID ¶
func (i *Interpreter) MapID() int
func (*Interpreter) PageIndex ¶
func (i *Interpreter) PageIndex() int
func (*Interpreter) PageRoute ¶
func (i *Interpreter) PageRoute() bool
func (*Interpreter) Parallel ¶
func (i *Interpreter) Parallel() bool
func (*Interpreter) RoomID ¶
func (i *Interpreter) RoomID() int
func (*Interpreter) Route ¶
func (i *Interpreter) Route() bool
func (*Interpreter) Sub ¶
func (i *Interpreter) Sub() InterpreterInterface
type InterpreterIDGenerator ¶
type InterpreterIDGenerator interface {
GenerateInterpreterID() consts.InterpreterID
}
type InterpreterInterface ¶
type InterpreterInterface interface { msgpack.CustomEncoder msgpack.CustomDecoder ID() consts.InterpreterID MapID() int RoomID() int EventID() int Sub() InterpreterInterface // TODO: Remove this Route() bool PageRoute() bool PageIndex() int Parallel() bool Update(sceneManager *scene.Manager, gameState *Game) error Abort(Aborter) IsExecuting() bool }
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func NewTitleMap ¶
func NewTitleMap() *Map
func (*Map) Background ¶
func (*Map) CurrentRoom ¶
func (*Map) DrawCharacters ¶
func (*Map) FindImageName ¶
func (*Map) FinishPlayerMovingByUserInput ¶
func (m *Map) FinishPlayerMovingByUserInput()
func (*Map) FocusingCharacter ¶
func (*Map) Foreground ¶
func (*Map) GetPressedPosition ¶
func (*Map) IsBlockingEventExecuting ¶
func (*Map) IsPlayerMovingByUserInput ¶
func (*Map) SetPressedPosition ¶
func (*Map) StartCombineCommands ¶
func (*Map) StartItemCommands ¶
func (*Map) TryMovePlayerByUserInput ¶
type Minigame ¶
type Minigame struct {
// contains filtered or unexported fields
}
func (*Minigame) LastActiveAt ¶
func (*Minigame) MarkLastActive ¶
func (m *Minigame) MarkLastActive()
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func (*Screen) ApplyShake ¶
func (*Screen) ApplyTintColor ¶
Click to show internal directories.
Click to hide internal directories.