frontispiece / packages / ink-processor / src / engine / events.ts
events.ts
Raw
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

import { InkStory } from "../inkTypes"
import { InkProcessor, VisualInkState, VisualStateProcessor } from "../types"

type InkEngine = InkProcessor & VisualStateProcessor
export type EmitterType = {
	initialized: {
		engine: InkEngine
	},
	locked: {
		engine: InkEngine,
		locked: boolean
	},
	advanced: {
		engine: InkEngine,
	},
	madeChoice: {
		engine: InkEngine,
		choice: number,
	},
	setInkStory: {
		story: InkStory, visualInkState: VisualInkState
	},
	updatedVisualInkState: {
		story: InkStory, visualInkState: VisualInkState
	}
}