Ejemplo n.º 1
0
        // Use this for initialization
        public virtual void Start()
        {
            Application.runInBackground = true;

            // Register delegates for incoming handData
            Apollo apollo = Apollo.GetInstance(DebugApollo);

            apollo.RegisterDataListener(newHandData);
            apollo.RegisterDataListener(newRawData);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the active instance of Apollo
        /// </summary>
        /// <returns></returns>
        public static Apollo GetInstance(bool debugging)
        {
            // Enable or disable debugging
            _showDebugLog          = debugging;
            ApolloTCP.ShowDebugLog = debugging;

            if (_instance != null)
            {
                return(_instance);
            }

            // Create a new instance of apollo if there is no active version
            var apolloGameObject = new GameObject("Apollo");

            return(_instance = apolloGameObject.AddComponent <Apollo>());
        }