Improve map lock and smart heading behavior
This commit is contained in:
@@ -73,6 +73,12 @@ export class SoundDirector {
|
||||
continue
|
||||
}
|
||||
|
||||
if (effect.type === 'session_cancelled') {
|
||||
this.stopGuidanceLoop()
|
||||
this.play('control_completed:finish')
|
||||
continue
|
||||
}
|
||||
|
||||
if (effect.type === 'punch_feedback' && effect.tone === 'warning') {
|
||||
this.play('punch_feedback:warning')
|
||||
continue
|
||||
|
||||
@@ -3,6 +3,7 @@ import { type GamePresentationState } from '../presentation/presentationState'
|
||||
|
||||
export type GameEffect =
|
||||
| { type: 'session_started' }
|
||||
| { type: 'session_cancelled' }
|
||||
| { type: 'punch_feedback'; text: string; tone: 'neutral' | 'success' | 'warning' }
|
||||
| { type: 'control_completed'; controlId: string; controlKind: 'start' | 'control' | 'finish'; sequence: number | null; label: string; displayTitle: string; displayBody: string }
|
||||
| { type: 'guidance_state_changed'; guidanceState: GuidanceState; controlId: string | null }
|
||||
|
||||
@@ -51,6 +51,11 @@ export class HapticsDirector {
|
||||
continue
|
||||
}
|
||||
|
||||
if (effect.type === 'session_cancelled') {
|
||||
this.trigger('session_finished')
|
||||
continue
|
||||
}
|
||||
|
||||
if (effect.type === 'punch_feedback' && effect.tone === 'warning') {
|
||||
this.trigger('punch_feedback:warning')
|
||||
continue
|
||||
|
||||
@@ -189,6 +189,10 @@ export class UiEffectDirector {
|
||||
if (effect.type === 'session_finished') {
|
||||
this.clearPunchButtonMotion()
|
||||
}
|
||||
|
||||
if (effect.type === 'session_cancelled') {
|
||||
this.clearPunchButtonMotion()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user