Example #1
0
        // Start is called before the first frame update
        void Start()
        {
            //Instantiating the GameSettings
            gameSettings = new GameSettings();

            //Subscribing to the udp events
            ExoUdpHost.OnElbowValue += OnElbowValue;
            ExoUdpHost.OnWristValue += OnWristValue;

            //Sub to calibration controller event
            _calibrationController.OnCalibrationDone += OnCalibrationDone;

            //Sub to gameUi events
            GameUI.OnStartClick   += NewGame;
            GameUI.OnRestartClick += RestartGame;
            GameUI.OnCountedDown  += OnCountedDown;

            //Subscribing the Cube event
            Cube.OnCollidedHand += OnCubeHitHand;
            Cube.OnNudgeTrigger += OnNudgeTrigger;
            Cube.OnCollided     += OnCubeHit;
            Cube.OnDisable      += OnCubeDisabled;

            //Initializing the object pool
            _objectManager.Init(4);

            //Initializing the grid
            _grid.Init(_distanceFromMiddle, _zStart);
        }