Example #1
0
        void OnEnable()
        {
            EasyWiFiController.On_ConnectionsChanged += checkForNewConnections;

            //do one check at the beginning just in case we're being spawned after startup and after the callbacks
            //have already been called
            if (doubleController[0] == null && EasyWiFiController.lastConnectedPlayerNumber >= 0)
            {
                EasyWiFiUtilities.checkForClient(control, (int)player, ref doubleController, ref currentNumberControllers);
            }
        }
        public void checkForNewConnections(bool isConnect, int playerNumber)
        {
            //check for client on all 3 UI navigation items
            EasyWiFiUtilities.checkForClient(submitControlName, (int)player, ref submitButton, ref submitCurrentNumberControllers);
            EasyWiFiUtilities.checkForClient(cancelControlName, (int)player, ref cancelButton, ref cancelCurrentNumberControllers);

            if (navigationControlType == EasyWiFiConstants.UNITY_UI_INPUT_TYPE.Dpad)
            {
                EasyWiFiUtilities.checkForClient(navigationControlName, (int)player, ref dpad, ref dpadCurrentNumberControllers);
            }
            else
            {
                EasyWiFiUtilities.checkForClient(navigationControlName, (int)player, ref joystick, ref joystickCurrentNumberControllers);
            }
        }
        protected override void OnEnable()
        {
            base.OnEnable();
            EasyWiFiController.On_ConnectionsChanged += checkForNewConnections;

            //do one check at the beginning just in case we're being spawned after startup and after the callbacks
            //have already been called
            if (submitButton[0] == null && EasyWiFiController.lastConnectedPlayerNumber >= 0)
            {
                //check for client on all 3 UI navigation items
                EasyWiFiUtilities.checkForClient(submitControlName, (int)player, ref submitButton, ref submitCurrentNumberControllers);
                EasyWiFiUtilities.checkForClient(cancelControlName, (int)player, ref cancelButton, ref cancelCurrentNumberControllers);

                if (navigationControlType == EasyWiFiConstants.UNITY_UI_INPUT_TYPE.Dpad)
                {
                    EasyWiFiUtilities.checkForClient(navigationControlName, (int)player, ref dpad, ref dpadCurrentNumberControllers);
                }
                else
                {
                    EasyWiFiUtilities.checkForClient(navigationControlName, (int)player, ref joystick, ref joystickCurrentNumberControllers);
                }
            }
        }
Example #4
0
        void OnEnable()
        {
            vectref[0] = 0;
            vectref[1] = 0;
            vectref[2] = -1;

            vectrefup[0] = 0;
            vectrefup[1] = 1;
            vectrefup[2] = 0;

            vectrefcross = Vector3.Cross(vectref, vectrefup);

            angleref = 60;


            EasyWiFiController.On_ConnectionsChanged += checkForNewConnections;

            //do one check at the beginning just in case we're being spawned after startup and after the callbacks
            //have already been called
            if (gyro[0] == null && EasyWiFiController.lastConnectedPlayerNumber >= 0)
            {
                EasyWiFiUtilities.checkForClient(control, (int)player, ref gyro, ref currentNumberControllers);
            }
        }
Example #5
0
 public void checkForNewConnections(bool isConnect, int playerNumber)
 {
     EasyWiFiUtilities.checkForClient(control, (int)player, ref doubleController, ref currentNumberControllers);
 }