Skip to content

Commit

Permalink
Added App
Browse files Browse the repository at this point in the history
This is the first version of Reaction Time Tester that GitHub has ever seen!
  • Loading branch information
Fried-man committed Jan 17, 2018
1 parent ca61848 commit 127c1fc
Show file tree
Hide file tree
Showing 27 changed files with 152 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Assets/God.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#pragma strict
var Instructions : UnityEngine.UI.Text;

var Reaction_Best : UnityEngine.UI.Text;

var Countdown_Time : float;
var Countup_Time : float;

function Start () {
Instructions.text = "Tap to start";
}

function Update () {
if (Input.GetMouseButtonDown(0) && Instructions.text == "wait") {
Instructions.text = "You tapped too early! Tap to try again.";
}else if (Input.GetMouseButtonDown(0) && Instructions.text == "tap the screen!") {
Instructions.text = "You took " + Countup_Time + " seconds! Tap to try again.";
if (PlayerPrefs.GetFloat("BestTime") == null || PlayerPrefs.GetFloat("BestTime") == 0) {
PlayerPrefs.SetFloat("BestTime", Countup_Time);
}else if (Countup_Time < PlayerPrefs.GetFloat("BestTime")) {
PlayerPrefs.SetFloat("BestTime", Countup_Time);
}
}else if (Input.GetMouseButtonDown(0)) {
Totally_Not_Waiting();
}

if (Instructions.text == "tap the screen!") {
Countup_Time += Time.deltaTime;
}

Reaction_Best.text = "Fastest reaction: " + PlayerPrefs.GetFloat("BestTime") +" seconds";
}

function Totally_Not_Waiting () {
Countup_Time = 0;
Countdown_Time = Random.Range(3.0f, 7.0f);
Instructions.text = "wait";
yield WaitForSeconds (Countdown_Time);
if (Instructions.text == "wait") {
Instructions.text = "tap the screen!";
}
}
12 changes: 12 additions & 0 deletions Assets/God.js.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/MainMenu.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/MainMenu.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/SFAutomaton.ttf
Binary file not shown.
21 changes: 21 additions & 0 deletions Assets/SFAutomaton.ttf.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/web_hi_res_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions Assets/web_hi_res_512.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added ProjectSettings/AudioManager.asset
Binary file not shown.
Binary file added ProjectSettings/ClusterInputManager.asset
Binary file not shown.
Binary file added ProjectSettings/DynamicsManager.asset
Binary file not shown.
Binary file added ProjectSettings/EditorBuildSettings.asset
Binary file not shown.
Binary file added ProjectSettings/EditorSettings.asset
Binary file not shown.
Binary file added ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file added ProjectSettings/InputManager.asset
Binary file not shown.
Binary file added ProjectSettings/NavMeshAreas.asset
Binary file not shown.
Binary file added ProjectSettings/NetworkManager.asset
Binary file not shown.
Binary file added ProjectSettings/Physics2DSettings.asset
Binary file not shown.
Binary file added ProjectSettings/ProjectSettings.asset
Binary file not shown.
1 change: 1 addition & 0 deletions ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
m_EditorVersion: 5.5.4f1
Binary file added ProjectSettings/QualitySettings.asset
Binary file not shown.
Binary file added ProjectSettings/TagManager.asset
Binary file not shown.
Binary file added ProjectSettings/TimeManager.asset
Binary file not shown.
Binary file added ProjectSettings/UnityAdsSettings.asset
Binary file not shown.
Binary file added ProjectSettings/UnityAnalyticsManager.asset
Binary file not shown.
Binary file added ProjectSettings/UnityConnectSettings.asset
Binary file not shown.
Binary file added user.keystore
Binary file not shown.

0 comments on commit 127c1fc

Please sign in to comment.