示例#1
0
    void FirstStart()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        Application.targetFrameRate = 60;
        Application.runInBackground = runInBackground;
        //Debug.Log ("NuitrackStart");

        if (asyncInit)
        {
            StartCoroutine(InitEventStart());

            if (!_threadRunning)
            {
                _thread = new Thread(ThreadedWork);
                _thread.Start();
            }
        }
        else
        {
            initState = NuitrackLoader.InitNuitrackLibraries();

            if (initEvent != null)
            {
                initEvent.Invoke(initState);
            }

#if UNITY_ANDROID && !UNITY_EDITOR
            if (IsNuitrackLibrariesInitialized())
#endif
            NuitrackInit();
        }
    }
示例#2
0
 private void InitComplete()
 {
     if (OnInitComplete != null)
     {
         OnInitComplete.Invoke();
     }
 }
示例#3
0
 public static void InvokeInitEvent(Error initError)
 {
     if (InitEvent != null)
     {
         InitEvent.Invoke(initError);
     }
 }
    void Awake()
    {
        //  NuitrackLoader.InitNuitrackLibraries();
        initState = NuitrackLoader.InitNuitrackLibraries();
        {
            if (initEvent != null)
            {
                initEvent.Invoke(initState);
            }
        }

        Screen.sleepTimeout = SleepTimeout.NeverSleep;
    }
        private void Log(string message, LogLevel level)
        {
            if (!_isInit)
            {
                _isInit = true;
                InitEvent?.Invoke();
            }

            var entry = new LogEntry
            {
                Timestamp = DateTime.Now,
                Message   = message,
                LogLevel  = level
            };

            LogEvent?.Invoke(entry);
        }
示例#6
0
        /// <summary>
        /// 要素を追加
        /// </summary>
        public void Add(GameObject gameObject, int count = 1)
        {
            for (var i = 0; i < count; i++)
            {
                var index = _items.Count;
                // 初期化処理
                InitEvent?.Invoke(gameObject);

                gameObject.transform.parent = transform;
                var pos = gameObject.transform.position;
                pos.z = transform.position.z;
                gameObject.transform.position = pos;

                var item = new RingLayoutItem(gameObject.transform as RectTransform, index);
                item.Button?.onClick.AddListener(() => ClickEvent?.Invoke(index));
                _items.Add(item);
            }
            Reposition();
        }
示例#7
0
    void Awake()
    {
        //  NuitrackLoader.InitNuitrackLibraries();
        initState = NuitrackLoader.InitNuitrackLibraries();
        {
            if (initEvent != null)
            {
                initEvent.Invoke(initState);
            }
        }

        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        Application.targetFrameRate = 60;

        //	Debug.Log ("NuitrackStart");

#if UNITY_ANDROID && !UNITY_EDITOR
        if (initState == NuitrackInitState.INIT_OK)
#endif
        NuitrackInit();
    }
示例#8
0
    void Awake()
    {
        initState = NuitrackAndroidLoader.InitNuitrackLibraries();

        if (initEvent != null) // Triggers for any listeners
        {
            initEvent.Invoke(initState);
        }

        Screen.sleepTimeout         = SleepTimeout.NeverSleep;
        Application.targetFrameRate = 60;

        if (initState == NuitrackInitState.INIT_OK)
        {
            NuitrackInit();

            nuitrack.Nuitrack.SetConfigValue("AstraProPerseeDepthProvider.RGB.Width", "1280");
            nuitrack.Nuitrack.SetConfigValue("AstraProPerseeDepthProvider.RGB.Height", "720");
            nuitrack.Nuitrack.SetConfigValue("AstraProPerseeDepthProvider.Depth.Width", "640");
            nuitrack.Nuitrack.SetConfigValue("AstraProPerseeDepthProvider.Depth.Height", "480");
            nuitrack.Nuitrack.SetConfigValue("Skeletonization.MaxDistance", "7000");
        }
    }
示例#9
0
 protected virtual void OnInit(InitEventArgs ies)
 {
     Console.WriteLine($"{ies.SpiderInfo}初始化完毕");
     InitEvent?.Invoke(this, ies);
 }
示例#10
0
 public void Init()
 {
     InitEvent?.Invoke(this, null);
 }