Skip to content
Snippets Groups Projects
Commit 4aab7222 authored by peters's avatar peters
Browse files

most final

parent 4b6b0acd
No related branches found
No related tags found
No related merge requests found
Showing
with 183 additions and 53 deletions
......@@ -15,6 +15,18 @@
},
{
"filename" : "demo_stone_texture06.arreferenceimage"
},
{
"filename" : "stone_1_schwarz.arreferenceimage"
},
{
"filename" : "stone_Fragezeichen_schwarz.arreferenceimage"
},
{
"filename" : "stone_H_schwarz.arreferenceimage"
},
{
"filename" : "stone_i_schwarz.arreferenceimage"
}
]
}
{
"images" : [
{
"filename" : "stone_1_schwarz.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"unit" : "centimeters",
"width" : 4.1246612466124661
}
}
{
"images" : [
{
"filename" : "stone_Fragezeichen_schwarz.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"unit" : "centimeters",
"width" : 8
}
}
{
"images" : [
{
"filename" : "stone_H_schwarz.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"unit" : "centimeters",
"width" : 0
}
}
{
"images" : [
{
"filename" : "stone_i_schwarz.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"unit" : "centimeters",
"width" : 8.6435986159169556
}
}
......@@ -4,7 +4,6 @@
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
......@@ -50,6 +49,15 @@
<action selector="btnResetGame:" destination="181-DP-seY" eventType="touchUpInside" id="Vzc-53-VU3"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ye2-ib-5ya">
<rect key="frame" x="318" y="39" width="36" height="26"/>
<autoresizingMask key="autoresizingMask"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="mainmenu_btn_ar.png"/>
<connections>
<action selector="btnShowAR:" destination="181-DP-seY" eventType="touchUpInside" id="ZKp-LQ-mxu"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="O3L-ny-7bN"/>
<constraints>
......@@ -89,7 +97,7 @@
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="qAL-el-en3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" red="0.8481633663" green="0.99272233249999997" blue="0.96470469240000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</view>
<connections>
<outlet property="tasksImages" destination="LwO-ar-Tgb" id="3P6-1p-pIT"/>
......@@ -116,7 +124,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q3d-yX-5Zb">
<rect key="frame" x="20" y="773" width="27" height="17"/>
<rect key="frame" x="20" y="608" width="27" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="explore_btn_inventory.png" imagePlacement="top"/>
......@@ -125,26 +133,37 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xia-PE-98c">
<rect key="frame" x="24" y="44" width="99" height="31"/>
<rect key="frame" x="24" y="44" width="23" height="31"/>
<autoresizingMask key="autoresizingMask"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Menu"/>
<buttonConfiguration key="configuration" style="plain" image="explore_btn_menu_hamburger.png"/>
<connections>
<action selector="btnMenu:" destination="i7I-eI-Nkw" eventType="touchUpInside" id="3Nh-CY-n6Z"/>
</connections>
</button>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="This is the &quot;A&quot;." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wyk-sH-5t1">
<rect key="frame" x="24" y="570" width="350" height="61"/>
<rect key="frame" x="24" y="480" width="350" height="61"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.8481633663" green="0.99272233249999997" blue="0.96470469240000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="21"/>
<color key="textColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FlW-aR-DhF">
<rect key="frame" x="119" y="495" width="152" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="explore_btn_reflect.png"/>
<connections>
<action selector="btnReflectAction:" destination="i7I-eI-Nkw" eventType="touchUpInside" id="3OA-l1-W92"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PLd-VN-hME">
<rect key="frame" x="125" y="639" width="130" height="31"/>
<rect key="frame" x="130" y="549" width="130" height="31"/>
<autoresizingMask key="autoresizingMask"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Use"/>
<buttonConfiguration key="configuration" style="plain" image="bruteForce_btn_use.png">
<preferredSymbolConfiguration key="preferredSymbolConfigurationForImage"/>
</buttonConfiguration>
<connections>
<action selector="btnUseAction:" destination="i7I-eI-Nkw" eventType="touchUpInside" id="cHk-Yg-gQq"/>
</connections>
......@@ -153,6 +172,7 @@
<viewLayoutGuide key="safeArea" id="1G2-d4-lGi"/>
</view>
<connections>
<outlet property="btnReflect" destination="FlW-aR-DhF" id="4UG-43-eIo"/>
<outlet property="btnUse" destination="PLd-VN-hME" id="RlJ-3a-0zv"/>
<outlet property="imageScanMask" destination="Hg8-ZO-JZR" id="VlB-tW-gp3"/>
<outlet property="labelDecoded" destination="Wyk-sH-5t1" id="t0B-2y-6ck"/>
......@@ -173,7 +193,7 @@
<rect key="frame" x="0.0" y="0.0" width="390" height="790"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="inventory_collected2.png" translatesAutoresizingMaskIntoConstraints="NO" id="wRa-6t-xft">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="inventory_not_collected.png" translatesAutoresizingMaskIntoConstraints="NO" id="wRa-6t-xft">
<rect key="frame" x="16" y="23" width="358" height="650"/>
</imageView>
</subviews>
......@@ -196,15 +216,16 @@
</scene>
</scenes>
<resources>
<image name="bruteForce_btn_use.png" width="16.319999694824219" height="13.439999580383301"/>
<image name="explore_btn_inventory.png" width="3" height="3"/>
<image name="explore_btn_menu_hamburger.png" width="5.7600002288818359" height="5.7600002288818359"/>
<image name="explore_btn_reflect.png" width="82.319999694824219" height="13.439999580383301"/>
<image name="explore_mask_scan.png" width="375" height="667"/>
<image name="inventory_collected2.png" width="362" height="656"/>
<image name="inventory_not_collected.png" width="362" height="656"/>
<image name="mainmenu_background03.png" width="512" height="911"/>
<image name="mainmenu_btn_ar.png" width="11.520000457763672" height="11.760000228881836"/>
<image name="mainmenu_btn_explore.png" width="375" height="71"/>
<image name="mainmenu_btn_reset.png" width="61" height="42"/>
<image name="mainmenu_btn_tutorial.png" width="375" height="71"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -20,20 +20,31 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
private var _pause : Bool = false
private var _taskImage : String = "ranking_passwords.png"
private var _inTask1 : Bool = false
private var _disclaimer_showed = false
private var subTask = 0
private var task11_stone_to_use = ""
private var task12_stones_to_use = ""
@IBOutlet weak var btnReflect: UIButton!
@IBAction func btnReflectAction(_ sender: Any) {
self._taskImage = "reflect_slide.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
}
@IBOutlet weak var btnUse: UIButton!
@IBAction func btnUseAction(_ sender: Any) {
if Game.isInTask1() == true && subTask == 1 {
print("Task1.1: Use-Button was tapped.")
if task11_stone_to_use == "1" {
print("Task1.1: correct stone selected")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._playPasswordsTaskBruteForceAttackFrom1To3Chars()
Game.setMode(mode: .task1)
subTask = 2
imageScanMask.image = UIImage(named:"bruteForce_mask_scan_four_stones.png")
self.labelDecoded.isHidden = true
self.btnUse.isEnabled = false
self.btnUse.isHidden = true
......@@ -41,17 +52,19 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
print("Settings: Station: " + Game.getActStation().toString() + ", mode:" + Game.getMode().toString() + ", subTask=" + String(subTask))
} else {
print("Task1.1: wrong stone selected")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
subTask = 1
self.labelDecoded.text = "This was the wrong answer."
//self.labelDecoded.isHidden = true
self.btnUse.isHidden = true
rkView.session.run(configurationPasswordsTask2)
rkView.session.run(configurationPasswordsTask1)
}
}
if Game.isInTask1() == true && subTask == 2 {
print("Task1.2: Use-Button was tapped.")
if task12_stones_to_use == "Hi1?" {
print("Task1.2: correct stones selected")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._playPasswordsTaskBruteForceAttackOutro()
subTask = 0
self.labelDecoded.isHidden = true
......@@ -64,6 +77,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
rkView.session.run(configurationPasswords)
} else {
print("Task1.2: wrong stones selected")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
subTask = 2
self.labelDecoded.text = "This was the wrong answer."
//self.labelDecoded.isHidden = true
......@@ -132,6 +146,20 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
Game.setMode(mode: .exploration)
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print("viewDidAppear(_:) called")
if self._disclaimer_showed == false {
self._taskImage = "explore_disclaimer.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
self._disclaimer_showed = true
}
}
/*
self._taskImage = "explore_disclaimer.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
*/
/*
Do something if we found an anchor, depending on the state
......@@ -146,6 +174,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
}
if let imageName = imageAnchor.name, imageName == "anchor_passwords_start" {
print("Start of Station Passwords") //debug
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._playIntroStationPasswords()
//delete the anchor
rkView.session.pause()
......@@ -172,8 +201,8 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
print("inTask1: no imageAnchor found")
return
}
if let imageName = imageAnchor.name, imageName == "demo_stone_texture02" {
print("Station Passwords - Task 1.1: demo_stone_texture02 anchor found")
if let imageName = imageAnchor.name, imageName == "demo_stone_texture05" { //"demo_stone_texture02" - "stone_H_schwarz"
print("Station Passwords - Task 1.1: stone for H anchor found")
rkView.session.remove(anchor: imageAnchor)
rkView.session.pause()
self.labelDecoded.text = "This is the 'H'."
......@@ -182,8 +211,8 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
self.task11_stone_to_use = "H"
return
}
if let imageName = imageAnchor.name, imageName == "demo_stone_texture03" {
print("Station Passwords - Task 1.1: demo_stone_texture02 anchor found")
if let imageName = imageAnchor.name, imageName == "demo_stone_texture02" { //"demo_stone_texture03" - "stone_i_schwarz"
print("Station Passwords - Task 1.1: stone for i anchor found")
rkView.session.remove(anchor: imageAnchor)
rkView.session.pause()
self.labelDecoded.text = "This is the 'i'"
......@@ -192,8 +221,8 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
self.task11_stone_to_use = "i"
return
}
if let imageName = imageAnchor.name, imageName == "demo_stone_texture05" {
print("Station Passwords - Task 1.1: demo_stone_texture02 anchor found")
if let imageName = imageAnchor.name, imageName == "demo_stone_texture06" { //"demo_stone_texture05" - "stone_1_schwarz"
print("Station Passwords - Task 1.1: stone for One anchor found")
rkView.session.remove(anchor: imageAnchor)
rkView.session.pause()
self.labelDecoded.text = "This is the '1'"
......@@ -202,8 +231,8 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
self.task11_stone_to_use = "1"
return
}
if let imageName = imageAnchor.name, imageName == "demo_stone_texture06" {
print("Station Passwords - Task 1.1: demo_stone_texture02 anchor found")
if let imageName = imageAnchor.name, imageName == "demo_stone_texture03" { //"demo_stone_texture06" - "stone_Fragezeichen_schwarz" //"demo_stone_texture06"
print("Station Passwords - Task 1.1: stone for questionmark anchor found")
rkView.session.remove(anchor: imageAnchor)
rkView.session.pause()
self.labelDecoded.text = "This is the '?'"
......@@ -259,6 +288,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
if Game.getStations()[0].getTasks()[0].isSolved() == false {
print("Start of Task 1 of Station Passwords")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._playPasswordsTaskBruteForceAttackIntro()
//new configuration, run session again
......@@ -299,6 +329,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
if Game.getStations()[0].getTasks()[1].isSolved() == false {
print("Start of Task 2 of Station Passwords")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._taskImage = "ranking_passwords.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
print("Show information ... we make just a sleep for 5 seconds")
......@@ -336,6 +367,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
if Game.getStations()[0].getTasks()[2].isSolved() == false {
print("Start of Task 3 of Station Passwords")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._taskImage = "types_of_usage.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
print("Show information ... we make just a sleep for 5 seconds")
......@@ -373,6 +405,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
if Game.getStations()[0].getTasks()[3].isSolved() == false {
print("Start of Task 4 of Station Passwords")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._taskImage = "good_idea_bad_idea.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
print("Show information ... we make just a sleep for 5 seconds")
......@@ -415,7 +448,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
}
alertController.addAction(okayAction)
self.present(alertController, animated: true, completion: nil)
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
rkView.session.remove(anchor: imageAnchor)
print("Removed anchor: anchor_passwords_end")
imageScanMask.image = UIImage(named:"station_passwords_scan_cube_plane.png")
......@@ -431,6 +464,7 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
if Game.getStations()[0].getTasks()[4].isSolved() == false {
print("Start of final Task 5 of Station Passwords")
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._taskImage = "strong_password.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
print("Show information ... we make just a sleep for 5 seconds")
......@@ -445,14 +479,17 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
print("Set up new AR configuration: Find a Cube")
rkView.session.run(configurationPasswords)
print("Final task 5 done, back to explore mode")
let timer2 = Timer.scheduledTimer(withTimeInterval: 20.0, repeats: false) {
let timer2 = Timer.scheduledTimer(withTimeInterval: 15.0, repeats: false) {
timer in
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
self._playPasswordsOutro()
self.btnReflect.isHidden = false
}
Game.setMode(mode: .exploration)
Game.setActStation(station: .none)
self.imageScanMask.isHidden = true
} else { // this should never happen
print("Taks 5 was already solved")
print("Task 5 was already solved")
rkView.session.pause()
let alertController = UIAlertController(title: "Information", message: "You've already passed this task and the whole station. Scan another cube to progress.", preferredStyle: .alert)
// Initialize Actions
......
......@@ -172,26 +172,31 @@ class Game {
let task1 = Task()
task1.setName(name: "Brute Force Attack")
task1.setDescription(description: "Ein leichtes und ein schwereres Passwort knacken.")
task1.setSolved(solved: false)
passwords.addTask(task: task1)
let task2 = Task()
task2.setName(name: "Ranking Passwords")
task2.setDescription(description: "Verschieden komplexe Passwort nach ihrer Sicherheit in eine Reihenfolge bringen.")
task2.setSolved(solved: false)
passwords.addTask(task: task2)
let task3 = Task()
task3.setName(name: "Types of Usage")
task3.setDescription(description: "Nutzungsarten: Gemeinsam genutztes Passwort, persönliches Passwort, Einmal-Passwort")
task3.setSolved(solved: false)
passwords.addTask(task: task3)
let task4 = Task()
task4.setName(name: "Good Idea - Bad Idea")
task4.setDescription(description: "gute und schlechte Aufbewahrungsmöglichkeiten von Passwörtern - Post-it unter der Tastatur, als Notiz im Handy, als Klartextdatei auf dem Computer, Passwortmanager")
task4.setSolved(solved: false)
passwords.addTask(task: task4)
let task5 = Task()
task5.setName(name: "Create a Safe Password")
task5.setDescription(description: "Ein sicheres Passwort erstellen. Rekapituliere das bisher Gelernte und nutze es. Erhalte ein entsprechendes Collectable.")
task5.setSolved(solved: false)
task5.setFinal(isFinal: true)
passwords.addTask(task: task5)
......@@ -204,33 +209,21 @@ class Game {
passwords.setSolved(solved: false)
let task1 = Task()
//task1.setName(name: "Brute Force Attack")
//task1.setDescription(description: "Ein leichtes und ein schwereres Passwort knacken.")
passwords.addTask(task: task1)
let task2 = Task()
//task2.setName(name: "Ranking Passwords")
//task2.setDescription(description: "Verschieden komplexe Passwort nach ihrer Sicherheit in eine Reihenfolge bringen.")
passwords.addTask(task: task2)
let task3 = Task()
//task3.setName(name: "Types of Usage")
//task3.setDescription(description: "Nutzungsarten: Gemeinsam genutztes Passwort, persönliches Passwort, Einmal-Passwort")
passwords.addTask(task: task3)
let task4 = Task()
//task4.setName(name: "Alternatives to Passwords")
//task4.setDescription(description: "2-Faktor-Authentifizerung - Legen eines geforderten Musters mit Legesteinen")
passwords.addTask(task: task4)
let task5 = Task()
//task5.setName(name: "Good Idea - Bad Idea")
//task5.setDescription(description: "gute und schlechte Aufbewahrungsmöglichkeiten von Passwörtern - Post-it unter der Tastatur, als Notiz im Handy, als Klartextdatei auf dem Computer, Passwortmanager")
passwords.addTask(task: task5)
let task6 = Task()
//task6.setName(name: "Create a Safe Password")
//task6.setDescription(description: "Ein sicheres Passwort erstellen. Rekapituliere das bisher Gelernte und nutze es. Erhalte ein entsprechendes Collectable.")
task6.setFinal(isFinal: true)
passwords.addTask(task: task6)
......
......@@ -14,11 +14,22 @@ class HomeViewController: UIViewController, UIAlertViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()
Game.resetGame()
//let mainMenuBackgroundImagePath = Bundle.main.path(forResource: "mainmenu_background02", ofType: "png")!
//print(mainMenuBackgroundImagePath)
//self.view.backgroundColor = UIColor(patternImage: UIImage(named: "mainmenu_background02.png")!)
//self.view.backgroundColor = UIColor(patternImage: UIImage(named: mainMenuBackgroundImagePath)!)
// Do any additional setup after loading the view.
}
@IBAction func btnShowAR(_ sender: Any) {
let url = URL(fileURLWithPath: Bundle.main.path(forResource: "ar-mode", ofType: "mp4")!)
// Create an AVPlayer, passing it the HTTP Live Streaming URL.
let player = AVPlayer(url: url)
// Create a new AVPlayerViewController and pass it a reference to the player.
let controller = AVPlayerViewController()
controller.player = player
// Modally present the player and call the player's play() method when complete.
present(controller, animated: true) {
player.play()
}
}
@IBAction func btnResetGame(_ sender: Any) {
......@@ -37,6 +48,7 @@ class HomeViewController: UIViewController, UIAlertViewDelegate {
@IBAction func btnStartExploration(_ sender: Any) {
Game.setMode(mode: .exploration)
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
performSegue(withIdentifier: "fromHome2ExploreSegue", sender: self)
}
......@@ -55,14 +67,5 @@ class HomeViewController: UIViewController, UIAlertViewDelegate {
player.play()
}
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
File added
Lets Literate/bruteForce_btn_use.png

2.55 KiB

Lets Literate/bruteForce_mask_scan_four_stones.png

13.8 KiB

Lets Literate/explore_btn_menu_hamburger.png

1.29 KiB

Lets Literate/explore_btn_reflect.png

5.67 KiB

Lets Literate/explore_disclaimer.png

51 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment