Skip to content
Snippets Groups Projects
Commit ee42877a authored by lukasWoyke's avatar lukasWoyke
Browse files

Comments and deleted unnecessary code.

parent 962e8a75
No related branches found
No related tags found
2 merge requests!60Code cleanup lukas fix,!55Code cleanup lukas
......@@ -29,7 +29,6 @@
80CD582A25CB6B030078031F /* CharacterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80CD582925CB6B030078031F /* CharacterManager.swift */; };
80D1699C25CE2AE40069375C /* SpinnerView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 80D1699B25CE2AE40069375C /* SpinnerView.xib */; };
80D169A425CE2C9B0069375C /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80D169A325CE2C9B0069375C /* SpinnerView.swift */; };
80DD334F25D201870030F56F /* TestConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80DD334E25D201870030F56F /* TestConnection.swift */; };
80E55F6725CF3A8600630587 /* SetUpState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E55F6625CF3A8600630587 /* SetUpState.swift */; };
80F869BA25A65CC900CF3D59 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80F869B925A65CC900CF3D59 /* GameKit.framework */; };
80F869BC25A65CFD00CF3D59 /* MutliplayerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80F869BB25A65CFD00CF3D59 /* MutliplayerManager.swift */; };
......@@ -97,7 +96,6 @@
80CD582925CB6B030078031F /* CharacterManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterManager.swift; sourceTree = "<group>"; };
80D1699B25CE2AE40069375C /* SpinnerView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SpinnerView.xib; sourceTree = "<group>"; };
80D169A325CE2C9B0069375C /* SpinnerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpinnerView.swift; sourceTree = "<group>"; };
80DD334E25D201870030F56F /* TestConnection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestConnection.swift; sourceTree = "<group>"; };
80E55F6625CF3A8600630587 /* SetUpState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetUpState.swift; sourceTree = "<group>"; };
80F869B925A65CC900CF3D59 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
80F869BB25A65CFD00CF3D59 /* MutliplayerManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutliplayerManager.swift; sourceTree = "<group>"; };
......@@ -202,6 +200,16 @@
path = "Better TogetherUITests";
sourceTree = "<group>";
};
804E95FD25D49CAD00D749C0 /* SetUp Process */ = {
isa = PBXGroup;
children = (
80E55F6625CF3A8600630587 /* SetUpState.swift */,
80D169A325CE2C9B0069375C /* SpinnerView.swift */,
80D1699B25CE2AE40069375C /* SpinnerView.xib */,
);
path = "SetUp Process";
sourceTree = "<group>";
};
80D59E8925BDE84500E24A69 /* Controls */ = {
isa = PBXGroup;
children = (
......@@ -266,6 +274,7 @@
F2FD143F25A07C4900A0181C /* UIViewComponents */ = {
isa = PBXGroup;
children = (
804E95FD25D49CAD00D749C0 /* SetUp Process */,
F2FD144025A07C7C00A0181C /* RoundedRectangleButton.swift */,
F2AB5B8725CD382300F8BA8E /* LevelCollectionViewCell.swift */,
F2AB5B8F25CD7D1600F8BA8E /* Spinner.swift */,
......@@ -276,13 +285,9 @@
F2FD144825A07EB900A0181C /* UIViews */ = {
isa = PBXGroup;
children = (
80E55F6625CF3A8600630587 /* SetUpState.swift */,
80D169A325CE2C9B0069375C /* SpinnerView.swift */,
80D1699B25CE2AE40069375C /* SpinnerView.xib */,
F2FD144C25A07F1200A0181C /* CharacterControlSettingViewController.swift */,
80CD582925CB6B030078031F /* CharacterManager.swift */,
F2FD145A25A098D100A0181C /* PlayerModeSelectorViewController.swift */,
80DD334E25D201870030F56F /* TestConnection.swift */,
808F8C9525ACFFE500C7FFFE /* LevelSelectionViewController.swift */,
);
path = UIViews;
......@@ -468,7 +473,6 @@
8084DEE625C040350053D095 /* HapticResponseController.swift in Sources */,
F2FD144D25A07F1200A0181C /* CharacterControlSettingViewController.swift in Sources */,
808F8CB425AD08AD00C7FFFE /* PlayMode.swift in Sources */,
80DD334F25D201870030F56F /* TestConnection.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -11,12 +11,10 @@ import CoreHaptics
class HapticResponseController {
// Feedback for grabbing.
static func openGrabFeedback() {
// MARK: - TODO: Remove the function if it is not used in any place
let generator = UIImpactFeedbackGenerator(style: .medium)
generator.impactOccurred()
}
static func grabNotSucceedFeedback() {
// MARK: - TODO: The function name should be changed according to its usage
let generator = UIImpactFeedbackGenerator(style: .rigid)
generator.impactOccurred()
}
......@@ -27,7 +25,6 @@ class HapticResponseController {
}
static func simpleFallDownFeedback() {
// MARK: - TODO: Remove the function if it is not used in any place
let generator = UIImpactFeedbackGenerator(style: .heavy)
generator.impactOccurred()
}
......
......@@ -7,6 +7,7 @@
import UIKit
/// SpinnerView is the waiting room whihc is presented on server side, while host is waiting for the other players.
class SpinnerView: UIView {
@IBOutlet var contentView: UIView!
......@@ -35,15 +36,9 @@ class SpinnerView: UIView {
contentView.frame = self.bounds
}
func updateProgress(progressCount: Int) {
let actualProgress: Float = Float(progressCount / maxProgress)
let percentage = actualProgress * 100
DispatchQueue.main.async { [self] in
self.infoLabel.text = "\(currentState.rawValue) \(percentage)%"
self.progressBar.setProgress(actualProgress, animated: true)
}
}
/// Start the anomation, by entering the number of maximum set up setps.
/// - Parameter maxProgress: The maximum steps until set up pocess is complete.
func start(maxProgress: Int) {
activityIndicator.startAnimating()
DispatchQueue.main.async {
......@@ -52,6 +47,15 @@ class SpinnerView: UIView {
self.maxProgress = maxProgress
}
func updateProgress(progressCount: Int) {
let actualProgress: Float = Float(progressCount / maxProgress)
let percentage = actualProgress * 100
DispatchQueue.main.async { [self] in
self.infoLabel.text = "\(currentState.rawValue) \(percentage)%"
self.progressBar.setProgress(actualProgress, animated: true)
}
}
func dismissView() {
DispatchQueue.main.async {
UIView.animate(withDuration: 0.2, animations: {
......
//
// TestConnection.swift
// Better Together
//
// Created by Lukas Woyke on 09.02.21.
//
import UIKit
import Network
// MARK: TODO - remove this if it is not used
extension PlayerModeSelectorViewController {
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment