Skip to content

Instantly share code, notes, and snippets.

@domaemon
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domaemon/665db8d52a486835fd1c to your computer and use it in GitHub Desktop.
Save domaemon/665db8d52a486835fd1c to your computer and use it in GitHub Desktop.
diff --git a/Assets/UnityChan2D/Demo/Scripts/StartController.cs b/Assets/UnityChan2D/Demo/Scripts/StartController.cs
index 48c49c4..d891269 100755
--- a/Assets/UnityChan2D/Demo/Scripts/StartController.cs
+++ b/Assets/UnityChan2D/Demo/Scripts/StartController.cs
@@ -9,6 +9,30 @@ public class StartController : MonoBehaviour
[SerializeField]
private KeyCode enter = KeyCode.X;
+ public Joystick touchJoystick;
+
+ private void CheckForRecordingPermission(bool granted)
+ {
+ if (granted)
+ {
+ Debug.Log("Microphone access was granted");
+ }
+ else
+ {
+ Debug.Log("Microphone access was DENIED");
+ }
+ }
+
+ void Awake()
+ {
+ Everyplay.FaceCamRecordingPermission += CheckForRecordingPermission;
+ Everyplay.FaceCamRequestRecordingPermission();
+ }
+
+ void OnDestroy()
+ {
+ Everyplay.FaceCamRecordingPermission -= CheckForRecordingPermission;
+ }
void Update()
{
@@ -16,6 +40,11 @@ public class StartController : MonoBehaviour
{
StartCoroutine(LoadStage());
}
+
+ if (touchJoystick.IsFingerDown())
+ {
+ StartCoroutine(LoadStage());
+ }
}
private IEnumerator LoadStage()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment