diff --git a/Lets Literate.xcodeproj/project.xcworkspace/xcuserdata/aljoscha.xcuserdatad/UserInterfaceState.xcuserstate b/Lets Literate.xcodeproj/project.xcworkspace/xcuserdata/aljoscha.xcuserdatad/UserInterfaceState.xcuserstate index 7ecfbfa6445d71c53f87122b0fa15ee7af8b0ea5..8cff49e457c05859638817a699a108e8e47bfe2a 100755 Binary files a/Lets Literate.xcodeproj/project.xcworkspace/xcuserdata/aljoscha.xcuserdatad/UserInterfaceState.xcuserstate and b/Lets Literate.xcodeproj/project.xcworkspace/xcuserdata/aljoscha.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Lets Literate/AppDelegate.swift b/Lets Literate/AppDelegate.swift index 3f2f3838c9203fc6e73b7b8012387791d820b2d5..48892f6320b934f4472dfcad12c2e2f9eeb09103 100755 --- a/Lets Literate/AppDelegate.swift +++ b/Lets Literate/AppDelegate.swift @@ -15,8 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - + ///added support for audio playback let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(.playback, mode: .moviePlayback) diff --git a/Lets Literate/HomeViewController.swift b/Lets Literate/HomeViewController.swift index 044de03f47a0902c328ccb216aa45922943636e7..af09a447885ef4734470b0612b4b1fd971f17176 100755 --- a/Lets Literate/HomeViewController.swift +++ b/Lets Literate/HomeViewController.swift @@ -8,14 +8,24 @@ import UIKit import AVKit import AVFoundation - +/** + Controller for the main menu. + This is the starting point of our app - the first view that is presented to the user. + The view has four buttons: + 1) AR = shows the video about the (not successfully included) AR experience. This should be deleted in a fully functioning app, of course. + 2) Start Exploration = leads to the exploration view with AR image anchor tracking and the real game experience. + 3) Tutorial = shows the tutorial video that is presented to the user and explains the general functionality of the game. + 4) Reset = resets the stats of the game to get a fresh experience. + */ class HomeViewController: UIViewController, UIAlertViewDelegate { override func viewDidLoad() { super.viewDidLoad() Game.resetGame() } - + /** + If button AR is clicked play a full screen video. + */ @IBAction func btnShowAR(_ sender: Any) { let url = URL(fileURLWithPath: Bundle.main.path(forResource: "ar-mode", ofType: "mp4")!) @@ -31,7 +41,9 @@ class HomeViewController: UIViewController, UIAlertViewDelegate { player.play() } } - + /** + If button Reset is clicked reset the game. Function uses the Game.reset function. After that the app presents an alert window to the user that tells him/her that the game was resetted. + */ @IBAction func btnResetGame(_ sender: Any) { print("Reset Button touched.") Game.resetGame() @@ -45,13 +57,17 @@ class HomeViewController: UIViewController, UIAlertViewDelegate { // Present Alert Controller self.present(alertController, animated: true, completion: nil) } - + /** + If button Start Exploration is tapped, vibrate and segue to the view of exploration mode --> ExploreViewController.swift. + */ @IBAction func btnStartExploration(_ sender: Any) { Game.setMode(mode: .exploration) AudioServicesPlaySystemSound(kSystemSoundID_Vibrate) performSegue(withIdentifier: "fromHome2ExploreSegue", sender: self) } - + /** + If button Tutorial is tapped play a full screen video. + */ @IBAction func btnPlayTutorialVideo(_ sender: Any) { let url = URL(fileURLWithPath: Bundle.main.path(forResource: "tutorial", ofType: "mp4")!) diff --git a/Lets Literate/ImagesViewController.swift b/Lets Literate/ImagesViewController.swift index 4ecea5d76c2b33ed5bbad49bdd7200258a576396..3f2dfadd22add65c42020fc9d9eee163af664c03 100755 --- a/Lets Literate/ImagesViewController.swift +++ b/Lets Literate/ImagesViewController.swift @@ -9,8 +9,14 @@ import UIKit import AVKit import AVFoundation +/** + Controller for showing windows in a new view, mostly for + - the inventory + - images to show information to the user like tasks that are not implemented in the demo. + */ class ImagesViewController: UIViewController { + ///standard image that is shown if no filename is passed through the segue var filename = "Avatar.png" @IBOutlet weak var tasksImages: UIImageView! diff --git a/Lets Literate/InventoryViewController.swift b/Lets Literate/InventoryViewController.swift index 7995187c0d48bbb417bfa057d3e65df5c0488ca9..b98543ca59af78966bbd298b875648ebebe2f50a 100755 --- a/Lets Literate/InventoryViewController.swift +++ b/Lets Literate/InventoryViewController.swift @@ -7,6 +7,9 @@ import UIKit +/** + Controller for showing the inventory - depending on the status of the game. + */ class InventoryViewController: UIViewController { @IBOutlet weak var inventoryImage: UIImageView! @@ -16,6 +19,10 @@ class InventoryViewController: UIViewController { self.showSolvedImage() } + /** + Checks if at least one station was solved. As we only have one station in the demo this means one station (or more) solved to show the image for a collected inventory. If no station was solved yet show an empty inventory. + For a fully functional app this should be rewritten to show approriate images for already solved stations. + */ private func showSolvedImage() { let solved = Game.getSolvedStations() if solved.count == 0 diff --git a/Lets Literate/VideoTutorialViewController.swift b/Lets Literate/VideoTutorialViewController.swift index c2dca1d42dd5a897e1075f39fb28cd9940e43829..d282b9e7726919dd681d75beb2c660ff71a8ba58 100755 --- a/Lets Literate/VideoTutorialViewController.swift +++ b/Lets Literate/VideoTutorialViewController.swift @@ -8,7 +8,9 @@ import UIKit import AVKit import AVFoundation - +/** + Deprecated class, never used. + */ class VideoTutorialViewController: UIViewController { override func viewDidLoad() { diff --git a/Lets Literate/ViewController.swift b/Lets Literate/ViewController.swift index 3006d2192ef9b088b056dadd3390222b690a1bad..c7dcfcc77a2074b28b0e559f9c1841670df81cda 100755 --- a/Lets Literate/ViewController.swift +++ b/Lets Literate/ViewController.swift @@ -8,6 +8,9 @@ import UIKit import RealityKit +/** + A left over ... deprecated + */ class ViewController: UIViewController { @IBOutlet var arView: ARView!