...

Package states

import "github.com/kijimaD/ruins/lib/states"
Overview
Index

Overview ▾

拠点でのコマンド選択画面

ゲームの導入テキストを表示するステート

Index ▾

func ItemGetEvent1() []es.State
func RaidEvent1() []es.State
type BattleState
    func (st *BattleState) Draw(world w.World, screen *ebiten.Image)
    func (st *BattleState) OnPause(world w.World)
    func (st *BattleState) OnResume(world w.World)
    func (st *BattleState) OnStart(world w.World)
    func (st *BattleState) OnStop(world w.World)
    func (st BattleState) String() string
    func (st *BattleState) Update(world w.World) states.Transition
type CraftMenuState
    func (st *CraftMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *CraftMenuState) OnPause(world w.World)
    func (st *CraftMenuState) OnResume(world w.World)
    func (st *CraftMenuState) OnStart(world w.World)
    func (st *CraftMenuState) OnStop(world w.World)
    func (st CraftMenuState) String() string
    func (st *CraftMenuState) Update(world w.World) states.Transition
type DebugMenuState
    func (st *DebugMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *DebugMenuState) OnPause(world w.World)
    func (st *DebugMenuState) OnResume(world w.World)
    func (st *DebugMenuState) OnStart(world w.World)
    func (st *DebugMenuState) OnStop(world w.World)
    func (st DebugMenuState) String() string
    func (st *DebugMenuState) Update(world w.World) states.Transition
type DungeonMenuState
    func (st *DungeonMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *DungeonMenuState) OnPause(world w.World)
    func (st *DungeonMenuState) OnResume(world w.World)
    func (st *DungeonMenuState) OnStart(world w.World)
    func (st *DungeonMenuState) OnStop(world w.World)
    func (st DungeonMenuState) String() string
    func (st *DungeonMenuState) Update(world w.World) states.Transition
type DungeonSelectState
    func (st *DungeonSelectState) Draw(world w.World, screen *ebiten.Image)
    func (st *DungeonSelectState) OnPause(world w.World)
    func (st *DungeonSelectState) OnResume(world w.World)
    func (st *DungeonSelectState) OnStart(world w.World)
    func (st *DungeonSelectState) OnStop(world w.World)
    func (st DungeonSelectState) String() string
    func (st *DungeonSelectState) Update(world w.World) states.Transition
type DungeonState
    func (st *DungeonState) Draw(world w.World, screen *ebiten.Image)
    func (st *DungeonState) OnPause(world w.World)
    func (st *DungeonState) OnResume(world w.World)
    func (st *DungeonState) OnStart(world w.World)
    func (st *DungeonState) OnStop(world w.World)
    func (st DungeonState) String() string
    func (st *DungeonState) Update(world w.World) states.Transition
type EquipMenuState
    func (st *EquipMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *EquipMenuState) OnPause(world w.World)
    func (st *EquipMenuState) OnResume(world w.World)
    func (st *EquipMenuState) OnStart(world w.World)
    func (st *EquipMenuState) OnStop(world w.World)
    func (st EquipMenuState) String() string
    func (st *EquipMenuState) Update(world w.World) states.Transition
type ExecState
    func (st *ExecState) Draw(world w.World, screen *ebiten.Image)
    func (st *ExecState) OnPause(world w.World)
    func (st *ExecState) OnResume(world w.World)
    func (st *ExecState) OnStart(world w.World)
    func (st *ExecState) OnStop(world w.World)
    func (st ExecState) String() string
    func (st *ExecState) Update(world w.World) states.Transition
type GameOverState
    func (st *GameOverState) Draw(world w.World, screen *ebiten.Image)
    func (st *GameOverState) OnPause(world w.World)
    func (st *GameOverState) OnResume(world w.World)
    func (st *GameOverState) OnStart(world w.World)
    func (st *GameOverState) OnStop(world w.World)
    func (st GameOverState) String() string
    func (st *GameOverState) Update(world w.World) states.Transition
type HomeMenuState
    func (st *HomeMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *HomeMenuState) OnPause(world w.World)
    func (st *HomeMenuState) OnResume(world w.World)
    func (st *HomeMenuState) OnStart(world w.World)
    func (st *HomeMenuState) OnStop(world w.World)
    func (st HomeMenuState) String() string
    func (st *HomeMenuState) Update(world w.World) states.Transition
type IntroState
    func (st *IntroState) Draw(world w.World, screen *ebiten.Image)
    func (st *IntroState) OnPause(world w.World)
    func (st *IntroState) OnResume(world w.World)
    func (st *IntroState) OnStart(world w.World)
    func (st *IntroState) OnStop(world w.World)
    func (st IntroState) String() string
    func (st *IntroState) Update(world w.World) states.Transition
type InventoryMenuState
    func (st *InventoryMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *InventoryMenuState) OnPause(world w.World)
    func (st *InventoryMenuState) OnResume(world w.World)
    func (st *InventoryMenuState) OnStart(world w.World)
    func (st *InventoryMenuState) OnStop(world w.World)
    func (st InventoryMenuState) String() string
    func (st *InventoryMenuState) Update(world w.World) states.Transition
type ItemCategoryType
type MainMenuState
    func (st *MainMenuState) Draw(world w.World, screen *ebiten.Image)
    func (st *MainMenuState) OnPause(world w.World)
    func (st *MainMenuState) OnResume(world w.World)
    func (st *MainMenuState) OnStart(world w.World)
    func (st *MainMenuState) OnStop(world w.World)
    func (st MainMenuState) String() string
    func (st *MainMenuState) Update(world w.World) states.Transition
type MessageState
    func (st *MessageState) Draw(world w.World, screen *ebiten.Image)
    func (st *MessageState) OnPause(world w.World)
    func (st *MessageState) OnResume(world w.World)
    func (st *MessageState) OnStart(world w.World)
    func (st *MessageState) OnStop(world w.World)
    func (st MessageState) String() string
    func (st *MessageState) Update(world w.World) states.Transition

Package files

battle.go battle_phase.go craft_menu.go debug_menu.go dungeon.go dungeon_menu.go dungeon_select.go equip_menu.go exec.go game_over.go home_menu.go intro.go inventory_menu.go lib.go main_menu.go message.go scenes.go

func ItemGetEvent1

func ItemGetEvent1() []es.State

汎用アイテム入手イベント

func RaidEvent1

func RaidEvent1() []es.State

汎用戦闘イベント開始

type BattleState

type BattleState struct {
    // contains filtered or unexported fields
}

func (*BattleState) Draw

func (st *BattleState) Draw(world w.World, screen *ebiten.Image)

func (*BattleState) OnPause

func (st *BattleState) OnPause(world w.World)

func (*BattleState) OnResume

func (st *BattleState) OnResume(world w.World)

func (*BattleState) OnStart

func (st *BattleState) OnStart(world w.World)

func (*BattleState) OnStop

func (st *BattleState) OnStop(world w.World)

func (BattleState) String

func (st BattleState) String() string

func (*BattleState) Update

func (st *BattleState) Update(world w.World) states.Transition

type CraftMenuState

type CraftMenuState struct {
    // contains filtered or unexported fields
}

func (*CraftMenuState) Draw

func (st *CraftMenuState) Draw(world w.World, screen *ebiten.Image)

func (*CraftMenuState) OnPause

func (st *CraftMenuState) OnPause(world w.World)

func (*CraftMenuState) OnResume

func (st *CraftMenuState) OnResume(world w.World)

func (*CraftMenuState) OnStart

func (st *CraftMenuState) OnStart(world w.World)

func (*CraftMenuState) OnStop

func (st *CraftMenuState) OnStop(world w.World)

func (CraftMenuState) String

func (st CraftMenuState) String() string

func (*CraftMenuState) Update

func (st *CraftMenuState) Update(world w.World) states.Transition

type DebugMenuState

type DebugMenuState struct {
    // contains filtered or unexported fields
}

func (*DebugMenuState) Draw

func (st *DebugMenuState) Draw(world w.World, screen *ebiten.Image)

func (*DebugMenuState) OnPause

func (st *DebugMenuState) OnPause(world w.World)

func (*DebugMenuState) OnResume

func (st *DebugMenuState) OnResume(world w.World)

func (*DebugMenuState) OnStart

func (st *DebugMenuState) OnStart(world w.World)

func (*DebugMenuState) OnStop

func (st *DebugMenuState) OnStop(world w.World)

func (DebugMenuState) String

func (st DebugMenuState) String() string

func (*DebugMenuState) Update

func (st *DebugMenuState) Update(world w.World) states.Transition

type DungeonMenuState

type DungeonMenuState struct {
    // contains filtered or unexported fields
}

func (*DungeonMenuState) Draw

func (st *DungeonMenuState) Draw(world w.World, screen *ebiten.Image)

func (*DungeonMenuState) OnPause

func (st *DungeonMenuState) OnPause(world w.World)

func (*DungeonMenuState) OnResume

func (st *DungeonMenuState) OnResume(world w.World)

func (*DungeonMenuState) OnStart

func (st *DungeonMenuState) OnStart(world w.World)

func (*DungeonMenuState) OnStop

func (st *DungeonMenuState) OnStop(world w.World)

func (DungeonMenuState) String

func (st DungeonMenuState) String() string

func (*DungeonMenuState) Update

func (st *DungeonMenuState) Update(world w.World) states.Transition

type DungeonSelectState

type DungeonSelectState struct {
    // contains filtered or unexported fields
}

func (*DungeonSelectState) Draw

func (st *DungeonSelectState) Draw(world w.World, screen *ebiten.Image)

func (*DungeonSelectState) OnPause

func (st *DungeonSelectState) OnPause(world w.World)

func (*DungeonSelectState) OnResume

func (st *DungeonSelectState) OnResume(world w.World)

func (*DungeonSelectState) OnStart

func (st *DungeonSelectState) OnStart(world w.World)

func (*DungeonSelectState) OnStop

func (st *DungeonSelectState) OnStop(world w.World)

func (DungeonSelectState) String

func (st DungeonSelectState) String() string

func (*DungeonSelectState) Update

func (st *DungeonSelectState) Update(world w.World) states.Transition

type DungeonState

type DungeonState struct {
    Depth int
}

func (*DungeonState) Draw

func (st *DungeonState) Draw(world w.World, screen *ebiten.Image)

func (*DungeonState) OnPause

func (st *DungeonState) OnPause(world w.World)

func (*DungeonState) OnResume

func (st *DungeonState) OnResume(world w.World)

func (*DungeonState) OnStart

func (st *DungeonState) OnStart(world w.World)

func (*DungeonState) OnStop

func (st *DungeonState) OnStop(world w.World)

func (DungeonState) String

func (st DungeonState) String() string

func (*DungeonState) Update

func (st *DungeonState) Update(world w.World) states.Transition

type EquipMenuState

type EquipMenuState struct {
    // contains filtered or unexported fields
}

func (*EquipMenuState) Draw

func (st *EquipMenuState) Draw(world w.World, screen *ebiten.Image)

func (*EquipMenuState) OnPause

func (st *EquipMenuState) OnPause(world w.World)

func (*EquipMenuState) OnResume

func (st *EquipMenuState) OnResume(world w.World)

func (*EquipMenuState) OnStart

func (st *EquipMenuState) OnStart(world w.World)

func (*EquipMenuState) OnStop

func (st *EquipMenuState) OnStop(world w.World)

func (EquipMenuState) String

func (st EquipMenuState) String() string

func (*EquipMenuState) Update

func (st *EquipMenuState) Update(world w.World) states.Transition

type ExecState

ステート管理に乗っかりつつ任意のコマンドを実行するためのダミーステート

type ExecState struct {
    // contains filtered or unexported fields
}

func (*ExecState) Draw

func (st *ExecState) Draw(world w.World, screen *ebiten.Image)

func (*ExecState) OnPause

func (st *ExecState) OnPause(world w.World)

func (*ExecState) OnResume

func (st *ExecState) OnResume(world w.World)

func (*ExecState) OnStart

func (st *ExecState) OnStart(world w.World)

state pushされたときはpush時にまとめてインスタンスを作成し、スタックトップに回ってきたときに使う。トップに回ってきたときに初期化しているわけではない。つまり、OnStartにf(world)を書くと複数stateをpushしたときに即実行されてしまう。そうではなく、スタックトップに来たときに実行してほしい。 ほかのstateではswitchを使っていることが多い。switchではstate stackを再作成して1つだけpushする。なので、stateインスタンス生成とスタックトップに来たときの時差がないため問題が起きない。

func (*ExecState) OnStop

func (st *ExecState) OnStop(world w.World)

func (ExecState) String

func (st ExecState) String() string

func (*ExecState) Update

func (st *ExecState) Update(world w.World) states.Transition

type GameOverState

type GameOverState struct {
    // contains filtered or unexported fields
}

func (*GameOverState) Draw

func (st *GameOverState) Draw(world w.World, screen *ebiten.Image)

func (*GameOverState) OnPause

func (st *GameOverState) OnPause(world w.World)

func (*GameOverState) OnResume

func (st *GameOverState) OnResume(world w.World)

func (*GameOverState) OnStart

func (st *GameOverState) OnStart(world w.World)

func (*GameOverState) OnStop

func (st *GameOverState) OnStop(world w.World)

func (GameOverState) String

func (st GameOverState) String() string

func (*GameOverState) Update

func (st *GameOverState) Update(world w.World) states.Transition

type HomeMenuState

type HomeMenuState struct {
    // contains filtered or unexported fields
}

func (*HomeMenuState) Draw

func (st *HomeMenuState) Draw(world w.World, screen *ebiten.Image)

func (*HomeMenuState) OnPause

func (st *HomeMenuState) OnPause(world w.World)

func (*HomeMenuState) OnResume

func (st *HomeMenuState) OnResume(world w.World)

func (*HomeMenuState) OnStart

func (st *HomeMenuState) OnStart(world w.World)

func (*HomeMenuState) OnStop

func (st *HomeMenuState) OnStop(world w.World)

func (HomeMenuState) String

func (st HomeMenuState) String() string

func (*HomeMenuState) Update

func (st *HomeMenuState) Update(world w.World) states.Transition

type IntroState

type IntroState struct {
    // contains filtered or unexported fields
}

func (*IntroState) Draw

func (st *IntroState) Draw(world w.World, screen *ebiten.Image)

func (*IntroState) OnPause

func (st *IntroState) OnPause(world w.World)

func (*IntroState) OnResume

func (st *IntroState) OnResume(world w.World)

func (*IntroState) OnStart

func (st *IntroState) OnStart(world w.World)

func (*IntroState) OnStop

func (st *IntroState) OnStop(world w.World)

func (IntroState) String

func (st IntroState) String() string

func (*IntroState) Update

func (st *IntroState) Update(world w.World) states.Transition

type InventoryMenuState

type InventoryMenuState struct {
    // contains filtered or unexported fields
}

func (*InventoryMenuState) Draw

func (st *InventoryMenuState) Draw(world w.World, screen *ebiten.Image)

func (*InventoryMenuState) OnPause

func (st *InventoryMenuState) OnPause(world w.World)

func (*InventoryMenuState) OnResume

func (st *InventoryMenuState) OnResume(world w.World)

func (*InventoryMenuState) OnStart

func (st *InventoryMenuState) OnStart(world w.World)

func (*InventoryMenuState) OnStop

func (st *InventoryMenuState) OnStop(world w.World)

func (InventoryMenuState) String

func (st InventoryMenuState) String() string

func (*InventoryMenuState) Update

func (st *InventoryMenuState) Update(world w.World) states.Transition

type ItemCategoryType

type ItemCategoryType string
var (
    // 道具
    ItemCategoryTypeItem ItemCategoryType = "ITEM"
    // 手札
    ItemCategoryTypeCard ItemCategoryType = "CARD"
    // 装備
    ItemCategoryTypeWearable ItemCategoryType = "WEARABLE"
    // 素材
    ItemCategoryTypeMaterial ItemCategoryType = "MATERIAL"
)
type MainMenuState struct {
    // contains filtered or unexported fields
}
func (st *MainMenuState) Draw(world w.World, screen *ebiten.Image)
func (st *MainMenuState) OnPause(world w.World)
func (st *MainMenuState) OnResume(world w.World)
func (st *MainMenuState) OnStart(world w.World)
func (st *MainMenuState) OnStop(world w.World)
func (st MainMenuState) String() string
func (st *MainMenuState) Update(world w.World) states.Transition

type MessageState

type MessageState struct {
    // contains filtered or unexported fields
}

func (*MessageState) Draw

func (st *MessageState) Draw(world w.World, screen *ebiten.Image)

func (*MessageState) OnPause

func (st *MessageState) OnPause(world w.World)

func (*MessageState) OnResume

func (st *MessageState) OnResume(world w.World)

func (*MessageState) OnStart

func (st *MessageState) OnStart(world w.World)

func (*MessageState) OnStop

func (st *MessageState) OnStop(world w.World)

func (MessageState) String

func (st MessageState) String() string

func (*MessageState) Update

func (st *MessageState) Update(world w.World) states.Transition