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
//Maximum i could get on Iphone was 100 Hz, if someone has idea to improve on this, let me know in comments | |
//Android i could get around 160 hz | |
//Both test were done on https://snack.expo.dev/ by pasting the below code and testing on expo app. | |
//For android i have read the following | |
//If you need an update interval less than 200ms, you should: add android.permission.HIGH_SAMPLING_RATE_SENSORS to app.json permissions field | |
//or if you are using bare workflow, add <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/> to AndroidManifest.xml. | |
import React, { useState, useEffect } from 'react'; | |
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; |
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
#if UNITY_ANDROID || UNITY_IOS || UNITY_EDITOR | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Firebase; | |
using Firebase.Auth; | |
using Google; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// Handles line drawing. Stores data for a line. | |
/// </summary> | |
[RequireComponent(typeof(SpriteRenderer))] | |
public class Line : MonoBehaviour | |
{ |
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
using UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine.EventSystems; | |
/// <summary> A modular and easily customisable Unity MonoBehaviour for handling swipe and pinch motions on mobile. </summary> | |
public class PanAndZoom : MonoBehaviour | |
{ | |
/// <summary> Called as soon as the player touches the screen. The argument is the screen position. </summary> |
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
namespace Google.Impl { | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
internal class GoogleSignInImpl : BaseObject, ISignInImpl { | |
#if UNITY_ANDROID | |
private const string DllName = "native-googlesignin"; |
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
namespace Google { | |
using System; | |
using System.Runtime.Serialization; | |
using System.Threading.Tasks; | |
using Google.Impl; | |
using UnityEngine; | |
public class GoogleSignIn { | |
#if !UNITY_ANDROID && !UNITY_IOS |
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
using System; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class PushKeyGenerator : MonoBehaviour | |
{ | |
public Text showUniqueKey; | |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: |