Skip to content

Feature/new continue #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 10, 2019
Prev Previous commit
Next Next commit
use chart ids
  • Loading branch information
ShMcK committed Jun 10, 2019
commit 7f0dd625fb956abf65f539414c7aede092b96493
14 changes: 7 additions & 7 deletions src/state/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const machine = Machine<
CR.MachineEvent
>(
{
id: 'tutorial',
id: 'root',
context: initialContext,
initial: 'SelectTutorial',
states: {
Expand Down Expand Up @@ -42,26 +42,26 @@ export const machine = Machine<
InitializeTutorial: {
onEntry: ['tutorialLaunch'],
on: {
TUTORIAL_LOADED: 'Tutorial'
TUTORIAL_LOADED: '#tutorial'
}
},
}
},
ContinueTutorial: {
onEntry: ['tutorialContinue'],
on: {
TUTORIAL_START: {
target: 'Tutorial.LoadNext',
}
TUTORIAL_START: '#tutorial-load-next'
}
},
}
},
Tutorial: {
id: 'tutorial',
initial: 'Summary',
states: {
LoadNext: {
onEntry: () => send('LOAD_NEXT'),
id: 'tutorial-load-next',
// onEntry: () => send('LOAD_NEXT'),
on: {
LOAD_NEXT: [
{
Expand Down Expand Up @@ -144,7 +144,7 @@ export const machine = Machine<
cond: 'hasNextLevel',
},
{
target: 'EndTutorial',
target: '#root.Tutorial.EndTutorial',
},
],
},
Expand Down