Skip to content

Commit

Permalink
🔀 Merge branch 'hugo/feature/Fill-activity-medley'
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Nov 9, 2023
2 parents 91f3158 + 5f1df51 commit 8f40d15
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,29 @@
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0

id: d82c2ee629034950a056433975fd41e8
id: 43a4ed54b7fe4e1ab05a82a4bab2be45
name: Medley
description: Cette activité rassemble toutes les interfaces disponibles
image: activity_color_recognition_1
sequence:
- exercises:
- instructions: Écoute le son puis touche le bon instrument
type: selection
interface: listenThenTouchToSelect
gameplay: selectAllRightAnswers
payload:
action:
type: ipad
value:
type: audio
value: violin
choices:
- value: image-instrument-violin-no_background
type: image
isRightAnswer: true
- value: image-instrument-drums-no_background
type: image

- instructions: Touche le bleu
type: selection
interface: touchToSelect
Expand All @@ -23,3 +40,112 @@ sequence:
type: color
- value: yellow
type: color

- instructions: Touche le rond rouge et le rond jaune
type: selection
interface: touchToSelect
gameplay: selectAllRightAnswers
payload:
choices:
- value: red
type: color
isRightAnswer: true
- value: yellow
type: color
isRightAnswer: true
- value: green
type: color

- instructions: Regarde l'image puis touche la bonne réponse
type: selection
interface: observeThenTouchToSelect
gameplay: selectAllRightAnswers
payload:
action:
type: ipad
value:
type: image
value: image-landscape-red
choices:
- value: yellow
type: color
- value: green
type: color
- value: blue
type: color
- value: purple
type: color
- value: red
type: color
isRightAnswer: true
- value: green
type: color

- instructions: Touche la couleur de Leka
type: selection
interface: robotThenTouchToSelect
gameplay: selectAllRightAnswers
payload:
action:
type: robot
value:
type: color
value: orange
choices:
- value: orange
type: color
isRightAnswer: true
- value: yellow
type: color
- value: red
type: color
- value: green
type: color
- value: blue
type: color

- instructions: Place le bon instrument dans le panier
type: dragAndDrop
interface: dragAndDrop
gameplay: selectAllRightAnswers
payload:
dropZoneA:
value: basket
type: image
choices:
- value: image-instrument-harmonica-no_background
type: image
- value: image-instrument-flute-no_background
type: image
dropZone: zoneA
- value: image-instrument-violin-no_background
type: image
- value: image-instrument-piano-no_background
type: image
- value: image-instrument-guitar-no_background
type: image

- instructions: Place les instruments dans les bonnes familles d'instruments
type: dragAndDrop
interface: dragAndDrop
gameplay: selectAllRightAnswers
payload:
dropZoneA:
value: image-placeholder-instruments_wind
type: image
dropZoneB:
value: image-placeholder-instruments_string
type: image
choices:
- value: image-instrument-harmonica-no_background
type: image
dropZone: zoneA
- value: image-instrument-piano-no_background
type: image
dropZone: zoneB
- value: image-instrument-saxophone-no_background
type: image
dropZone: zoneA



Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ public struct ActivityView: View {
VStack {
VStack(spacing: 15) {
ActivityProgressBar(viewModel: viewModel)
.id(viewModel.currentExerciseIndexInSequence)

ExerciseInstructionsButton(instructions: viewModel.currentExercise.instructions)
.id(viewModel.currentExerciseIndexInSequence)
}

VStack {
Expand All @@ -33,6 +31,7 @@ public struct ActivityView: View {
Spacer()
}
}
.id(viewModel.currentExerciseIndexInSequence)

continueButton
}
Expand Down Expand Up @@ -76,35 +75,30 @@ public struct ActivityView: View {
exercise: viewModel.currentExercise,
data: viewModel.currentExerciseSharedData
)
.id(viewModel.currentExerciseIndexInSequence)

case .robotThenTouchToSelect:
RobotThenTouchToSelectView(
exercise: viewModel.currentExercise,
data: viewModel.currentExerciseSharedData
)
.id(viewModel.currentExerciseIndexInSequence)

case .listenThenTouchToSelect:
ListenThenTouchToSelectView(
exercise: viewModel.currentExercise,
data: viewModel.currentExerciseSharedData
)
.id(viewModel.currentExerciseIndexInSequence)

case .observeThenTouchToSelect:
ObserveThenTouchToSelectView(
exercise: viewModel.currentExercise,
data: viewModel.currentExerciseSharedData
)
.id(viewModel.currentExerciseIndexInSequence)

case .dragAndDrop:
DragAndDropView(
exercise: viewModel.currentExercise,
data: viewModel.currentExerciseSharedData
)
.id(viewModel.currentExerciseIndexInSequence)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class ActivityViewViewModel: ObservableObject {

private func updateValues() {
currentExercise = sequenceManager.currentExercise
currentExerciseInterface = sequenceManager.currentExercise.interface
currentSequenceIndex = sequenceManager.currentSequenceIndex
totalSequences = sequenceManager.totalSequences
currentExerciseIndexInSequence = sequenceManager.currentExerciseIndexInSequence
Expand Down

0 comments on commit 8f40d15

Please sign in to comment.