Skip to content
Snippets Groups Projects
Commit 2e6c7ce2 authored by peters's avatar peters
Browse files

explore controller comments

important comments done. not everything is commented because it is self-explaining.
parent ae7039c2
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,9 @@ import ARKit
import AVKit
import AVFoundation
/**
Main controller with almost the whole game logic.
*/
class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDelegate {
@IBOutlet weak var rkView: ARView!
......@@ -28,13 +31,19 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
@IBOutlet weak var btnReflect: UIButton!
/**
If button reflect is tapped show image.
*/
@IBAction func btnReflectAction(_ sender: Any) {
self._taskImage = "reflect_slide.png"
performSegue(withIdentifier: "fromExplore2ImagesSegue", sender: self)
}
@IBOutlet weak var btnUse: UIButton!
/**
Within the Brute Force Attack subtask there appears the button Use after an image anchor (stone) was recognized.
It will show if the right solution was chosen.
*/
@IBAction func btnUseAction(_ sender: Any) {
if Game.isInTask1() == true && subTask == 1 {
print("Task1.1: Use-Button was tapped.")
......@@ -93,12 +102,14 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
}
}
///Different configurations for the different modes of the game
let configurationStations = ARImageTrackingConfiguration() //configuration object for exploration
let configurationPasswords = ARImageTrackingConfiguration() //configuration object for station passwords - the planes
let configurationPasswordsTask1 = ARImageTrackingConfiguration() //configuration object for station passwords - the puzzle pieces
let configurationPasswordsTask2 = ARImageTrackingConfiguration() //configuration object for station passwords - the puzzle pieces
/**
After the view is loaded initialize everything for AR experience
*/
override func viewDidLoad() {
super.viewDidLoad()
......@@ -145,7 +156,9 @@ class ExploreViewController: UIViewController, ARSessionDelegate, UIAlertViewDel
Game.setMode(mode: .exploration)
}
/**
After the view appeared show the disclaimer image.
*/
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print("viewDidAppear(_:) called")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment