Esempio n. 1
0
 void Start()
 {
     if (Application.platform == RuntimePlatform.Android)
     {
         btControl = BluetoothControl.Instance;
     }
     light2d.enabled = false;
 }
Esempio n. 2
0
 void Awake()
 {
     if (Application.platform == RuntimePlatform.Android)
     {
         btControl = BluetoothControl.Instance;
         BluetoothControl.Server.ServerObject = this.gameObject.name;
     }
     globalScore = SaveStatus.Load();
     cards       = new Card[rows, columns];
     current_x   = 0;
     current_y   = 0;
 }
Esempio n. 3
0
    void Start()
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            ToggleButton(buttons[0]);
            btControl = BluetoothControl.Instance;
            x         = y = 0;
        }

        globalScore = SaveStatus.Load();
        buttonIds   = new int[buttons.Length];
        for (int i = 0; i < buttons.Length; i++)
        {
            int aux = i;
            buttons[i].onClick.AddListener(() => ButtonPressed(aux));
            buttonIds[i] = aux;
        }
        GenerateSequence();
        PlaySequence();
    }
Esempio n. 4
0
    void Awake()
    {
        if (Application.platform != RuntimePlatform.Android)
        {
            return;
        }

        if (_instance != null && _instance != this)
        {
            DestroyImmediate(this.gameObject);
        }
        else
        {
            _instance        = this;
            _instance.server = new BluetoothServer();
            if (Bluetooth.IsEnabled)
            {
                _instance.server.Start();
            }
            _instance.server.PlayerObject = this.gameObject.name;
            DontDestroyOnLoad(this.gameObject);
        }
    }
Esempio n. 5
0
 void Start()
 {
     rb2       = GetComponent <Rigidbody2D>();
     btControl = BluetoothControl.Instance;
 }
Esempio n. 6
0
 void Start()
 {
     control = BluetoothControl.Instance;
 }