Example #1
0
 /// <summary>
 /// Gets the singleton instance.
 /// Only one instance of this object can be used in the program.
 /// Multiple instances can produce java exceptions untreatable in the c# code.
 /// </summary>
 /// <returns>The singleton instance.</returns>
 public static TamabinConnector getInstance()
 {
     if (instance == null)
     {
         instance = new TamabinConnector();
     }
     return(instance);
 }
Example #2
0
    void Start()
    {
        DontDestroyOnLoad(gameObject);

                #if UNITY_ANDROID
        connector = TamabinConnector.getInstance();
        connector.SetTamabinBluetoothName(tamabinBluetoothName);
        lastMessage = "";
        connected   = false;
                #endif

                #if UNITY_EDITOR
        editorConnected = false;
        tamaguchiEat    = false;
                #endif
    }