Skip to content

Commit

Permalink
🔀 Merge branch 'hugo/feature/Add-HideAndSeek'
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Nov 29, 2023
2 parents 66f34ef + 1460f15 commit a89f863
Show file tree
Hide file tree
Showing 25 changed files with 455 additions and 219 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Leka - iOS Monorepo
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0

id: 4843737a16e348c183551db21053cd8d
name: Hide and Seek
description: L'objectif est de trouver Leka, caché quelque part dans la pièce
image: activity_color_recognition_1
sequence:
- exercises:
- instructions: Trouves Leka qui est caché et qui fait du bruit et de la lumière
interface: hideAndSeek
payload:
instructions:
text_main_instructions: Appuyer sur "OK" lorsque Leka est caché
text_sub_instructions: |
Incites la personne accompagnée à chercher Leka.
Tu peux lancer un renforçateur pour lui donner
un indice visuel et/ou sonore.
Appuies sur "TROUVÉ !" une fois le robot trouvé.
text_button_ok: OK
text_button_robot_found: Trouvé
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let kActivities: [Activity] = [

ContentKit.decodeActivity("remote-standard"),
ContentKit.decodeActivity("remote-arrow"),
ContentKit.decodeActivity("activity-hideAndSeek"),
]

struct GEKNewSystemView: View {
Expand Down
44 changes: 44 additions & 0 deletions Modules/ContentKit/Sources/Exercise/Exercice+HideAndSeek.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Leka - iOS Monorepo
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

public enum HideAndSeek {

public struct Payload: Codable {

public struct Instructions: Codable {
public let textMainInstructions: String
public let textSubInstructions: String
public let textButtonOk: String
public let textButtonRobotFound: String

enum CodingKeys: String, CodingKey {
case textMainInstructions = "text_main_instructions"
case textSubInstructions = "text_sub_instructions"
case textButtonOk = "text_button_ok"
case textButtonRobotFound = "text_button_robot_found"
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)

self.textMainInstructions = try container.decode(String.self, forKey: .textMainInstructions)
self.textSubInstructions = try container.decode(String.self, forKey: .textSubInstructions)
self.textButtonOk = try container.decode(String.self, forKey: .textButtonOk)
self.textButtonRobotFound = try container.decode(String.self, forKey: .textButtonRobotFound)
}
}

public let instructions: Instructions

enum CodingKeys: String, CodingKey {
case instructions
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.instructions = try container.decode(Instructions.self, forKey: .instructions)
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extension Exercise {
case danceFreeze
case remoteStandard
case remoteArrow
case hideAndSeek
}

}
1 change: 1 addition & 0 deletions Modules/ContentKit/Sources/Exercise/Exercise+Payload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ extension TouchToSelect.Payload: ExercisePayloadProtocol {}
extension DragAndDropIntoZones.Payload: ExercisePayloadProtocol {}
extension DragAndDropToAssociate.Payload: ExercisePayloadProtocol {}
extension AudioRecordingPlayer.Payload: ExercisePayloadProtocol {}
extension HideAndSeek.Payload: ExercisePayloadProtocol {}
3 changes: 3 additions & 0 deletions Modules/ContentKit/Sources/Exercise/Exercise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public struct Exercise: Codable {
case (.danceFreeze, .none):
payload = try container.decode(AudioRecordingPlayer.Payload.self, forKey: .payload)

case (.hideAndSeek, .none):
payload = try container.decode(HideAndSeek.Payload.self, forKey: .payload)

case (.remoteStandard, .none),
(.remoteArrow, .none):
payload = nil
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"provides-namespace" : true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "icon-stimulation-light.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "icon-stimulation-motion.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "image-illustration.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 0 additions & 40 deletions Modules/GameEngineKit/Sources/Staging/HideAndSeek/HiddenView.swift

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a89f863

Please sign in to comment.