-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
745d56b
commit 3643f97
Showing
59 changed files
with
7,669 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using UnityEngine; | ||
|
||
public class AutoHideTaskbar : MonoBehaviour | ||
{ | ||
public GameObject taskbar; | ||
|
||
void Update() | ||
{ | ||
if ((Input.touchCount != 0) || ((Input.GetAxis("Mouse X") != 0) || (Input.GetAxis("Mouse Y") != 0))) | ||
{ | ||
taskbar.SetActive(true); | ||
CancelInvoke("HideUISystem"); | ||
} | ||
|
||
else | ||
{ | ||
Invoke("HideUISystem", 1f); | ||
} | ||
} | ||
|
||
void HideUISystem() | ||
{ | ||
taskbar.SetActive(false); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class Initialization : MonoBehaviour | ||
{ | ||
[SerializeField] | ||
private settings Settings; | ||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
Settings.InitializeSettings(); | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class Mirror : MonoBehaviour | ||
{ | ||
[SerializeField] | ||
private RectTransform mainTextInputTransform; | ||
[SerializeField] | ||
private RectTransform teleprompterPlayText; | ||
|
||
public void MirrorText() | ||
{ | ||
Debug.Log("mirroring text"); | ||
mainTextInputTransform.localScale = new Vector3(mainTextInputTransform.localScale.x*-1, 1,1); | ||
teleprompterPlayText.localScale = mainTextInputTransform.localScale; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class PlayAndStop : MonoBehaviour | ||
{ | ||
[SerializeField] | ||
private Sprite playIcon; | ||
|
||
[SerializeField] | ||
private Sprite stopIcon; | ||
|
||
[SerializeField] | ||
private InputField mainInputField; | ||
|
||
[SerializeField] | ||
private Text playText; | ||
|
||
[SerializeField] | ||
private Image playButtonIcon; | ||
|
||
private bool currentlyPlaying = false; | ||
|
||
[SerializeField] | ||
private settings Settings; | ||
|
||
private const float playTextDefaultYPosition = -287.5f; | ||
private const float mouseScrollScale = 20f; | ||
|
||
public void OnPlayStopButonClick() | ||
{ | ||
if(currentlyPlaying) | ||
{ | ||
Stop(); | ||
} | ||
else | ||
{ | ||
Play(); | ||
} | ||
} | ||
public void Play() | ||
{ | ||
mainInputField.gameObject.SetActive(false); | ||
playText.gameObject.SetActive(true); | ||
playText.fontSize = mainInputField.textComponent.fontSize; | ||
playText.text = mainInputField.text; | ||
playText.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(playText.gameObject.GetComponent<RectTransform>().sizeDelta.x, 1); | ||
playButtonIcon.sprite = stopIcon;//change the icon indicating that we can stop | ||
currentlyPlaying = true; | ||
} | ||
public void Stop() | ||
{ | ||
mainInputField.gameObject.SetActive(true); | ||
playText.gameObject.SetActive(false); | ||
playButtonIcon.sprite = playIcon;//change the icon indicating that we can play | ||
|
||
currentlyPlaying = false; | ||
} | ||
|
||
void Update() | ||
{ | ||
float newYPos = 0; | ||
|
||
if (currentlyPlaying)//if we are playing | ||
{ | ||
if(Settings.autoScrollActiveSetting && Input.mouseScrollDelta.y == 0)//if auto scroll is enabled, scroll away! | ||
{ | ||
newYPos = (playText.gameObject.GetComponent<RectTransform>().anchoredPosition.y) + (Settings.scrollSpeedActiveSetting * Time.deltaTime); | ||
} | ||
|
||
//Debug.Log("scrolling"); | ||
if (Input.mouseScrollDelta.y != 0)//also scroll if we are using the mouse | ||
{ | ||
//Debug.Log("mouse scroll detected!"); | ||
//Debug.Log("mouse scroll value: " + Input.mouseScrollDelta.y); | ||
//Debug.Log("mouse scroll scaled speed:" + ); | ||
newYPos = (playText.gameObject.GetComponent<RectTransform>().anchoredPosition.y) + (Input.mouseScrollDelta.y * mouseScrollScale); | ||
} | ||
|
||
playText.gameObject.GetComponent<RectTransform>().anchoredPosition = new Vector2(playText.gameObject.GetComponent<RectTransform>().anchoredPosition.x, newYPos); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.