Skip to content

Commit

Permalink
Merge pull request #5 from phiat/master
Browse files Browse the repository at this point in the history
update README for State -> MyState consistency
  • Loading branch information
joelschutz authored Feb 25, 2024
2 parents 6886585 + a385caa commit 6565687
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 6565687

Please sign in to comment.