Skip to content

Commit

Permalink
update README for State -> MyState consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
phiat committed Feb 25, 2024
1 parent 6886585 commit a385caa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import "github.com/example/stagehand"
To use Stagehand, you first need to create a struct that implements the `Scene` interface:

```go
type State struct {
type MyState struct {
// your state data
}

Expand All @@ -44,11 +44,11 @@ func (s *MyScene) Draw(screen *ebiten.Image) {
// your draw code
}

func (s *MyScene) Load(state State ,manager *stagehand.SceneManager) {
func (s *MyScene) Load(state MyState ,manager *stagehand.SceneManager) {
// your load code
}

func (s *MyScene) Unload() State {
func (s *MyScene) Unload() MyState {
// your unload code
}
```
Expand All @@ -60,7 +60,7 @@ func main() {
// ...
scene1 := &MyScene{}
state := MyState{}
manager := stagehand.NewSceneManager[State](scene1, state)
manager := stagehand.NewSceneManager[MyState](scene1, state)

if err := ebiten.RunGame(sm); err != nil {
log.Fatal(err)
Expand Down

0 comments on commit a385caa

Please sign in to comment.