Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameState ¶
type GameState struct {
SceneManager *SceneManager
}
GameState describe the state of this game.
type Scene ¶
type Scene interface { Initialize() error Update(state *GameState) Draw(screen *ebiten.Image) StartMusic() StopMusic() error }
Scene is interface for the all scenes.
type SceneManager ¶
type SceneManager struct {
// contains filtered or unexported fields
}
SceneManager manages all scenes.
func NewSceneManager ¶
func NewSceneManager(ver string) *SceneManager
NewSceneManager returns a new SceneManager.
func (*SceneManager) Draw ¶
func (s *SceneManager) Draw(r *ebiten.Image)
Draw draws background and characters. This function play music too.
func (*SceneManager) GoTo ¶
func (s *SceneManager) GoTo(scene Scene) error
GoTo sets resources to the new scene and change the current scene to the new scene. This stops the music of the current and starts the music of the next.
func (*SceneManager) Update ¶
func (s *SceneManager) Update()
Update updates the status of this scene.
type SelectScene ¶
type SelectScene struct {
// contains filtered or unexported fields
}
SelectScene is the scene to select the player character.
func (*SelectScene) Draw ¶
func (s *SelectScene) Draw(screen *ebiten.Image)
Draw draws background and characters.
func (*SelectScene) Initialize ¶
func (s *SelectScene) Initialize() error
Initialize initializes all resources.
func (*SelectScene) StopMusic ¶
func (s *SelectScene) StopMusic() error
StopMusic stops playing music
func (*SelectScene) Update ¶
func (s *SelectScene) Update(state *GameState)
Update updates the status of this scene.
type Stage01Scene ¶
type Stage01Scene struct {
// contains filtered or unexported fields
}
Stage01Scene is the scene for the 1st stage game.
func (*Stage01Scene) Draw ¶
func (s *Stage01Scene) Draw(screen *ebiten.Image)
Draw draws background and characters.
func (*Stage01Scene) Initialize ¶
func (s *Stage01Scene) Initialize() error
Initialize initializes all resources.
func (*Stage01Scene) StartMusic ¶
func (s *Stage01Scene) StartMusic()
StartMusic starts playing music
func (*Stage01Scene) StopMusic ¶
func (s *Stage01Scene) StopMusic() error
StopMusic stops playing music
func (*Stage01Scene) Update ¶
func (s *Stage01Scene) Update(state *GameState)
Update updates the status of this scene.
type TitleScene ¶
type TitleScene struct {
// contains filtered or unexported fields
}
TitleScene is the scene for title.
func (*TitleScene) Draw ¶
func (s *TitleScene) Draw(r *ebiten.Image)
Draw draws background and characters.
func (*TitleScene) Initialize ¶
func (s *TitleScene) Initialize() error
Initialize initializes all resources.
func (*TitleScene) Update ¶
func (s *TitleScene) Update(state *GameState)
Update updates the status of this scene.