Exemplo n.º 1
0
 private void Start()
 {
     MainMenu.node = new int[18];
     for (int i = 0; i < 18; i++)
     {
         MainMenu.node[i] = 0;
     }
     if (this.headArea == new Rect(0f, 0f, 0f, 0f))
     {
         this.headArea = new Rect(600f, 70f, 225f * this.int_scale, 200f * this.int_scale);
     }
     if (this.head == new Rect(0f, 0f, 0f, 0f))
     {
         this.head = new Rect(0f, 0f, 200f * this.int_scale, 200f * this.int_scale);
     }
     this.sp = new SaveProfile();
     try
     {
         EmotivProfile.read(out this.sp);
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_HORIEYE, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.look));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_BLINK, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.blink));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_WINK_LEFT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.wink_l));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_WINK_RIGHT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.wink_r));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_EYEBROW, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.brow));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_CLENCH, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.teeth));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_SMILE, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.smile));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_SMIRK_RIGHT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.smirk_r));
         EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_SMIRK_LEFT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.smirk_l));
     }
     catch (Exception var_1_1F3)
     {
     }
 }
Exemplo n.º 2
0
 public void ExpressivSetThreshold(uint userId, EdkDll.EE_ExpressivAlgo_t algoName, EdkDll.EE_ExpressivThreshold_t thresholdName, int value)
 {
     EmoEngine.errorHandler(EdkDll.EE_ExpressivSetThreshold(userId, algoName, thresholdName, value));
 }
Exemplo n.º 3
0
 private void myfunc(int i)
 {
     if (this.check_button1)
     {
         if (this.isEnable)
         {
             this.DrawGUI();
         }
         GUI.skin = this.MySkin;
         GUI.Label(new Rect(250f, 90f, 150f, 35f), "Look left/right");
         GUI.Label(new Rect(250f, 120f, 150f, 35f), "Blink");
         GUI.Label(new Rect(250f, 150f, 150f, 35f), "Left wink");
         GUI.Label(new Rect(250f, 180f, 150f, 35f), "Right wink");
         GUI.Label(new Rect(250f, 210f, 150f, 35f), "Raise brow");
         GUI.Label(new Rect(250f, 240f, 150f, 35f), "Clench teeth");
         GUI.Label(new Rect(250f, 270f, 150f, 35f), "Smile");
         GUI.Label(new Rect(250f, 300f, 150f, 35f), "Right Smirk");
         GUI.Label(new Rect(250f, 330f, 150f, 35f), "Left Smirk");
         GUI.skin = this.skin4;
         try
         {
             float num = GUI.HorizontalSlider(new Rect(350f, 100f, 200f, 20f), this.sp.look, 0f, 10f);
             if (num != this.sp.look)
             {
                 this.sp.look = num;
                 Debug.Log("Look:" + this.sp.look);
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_HORIEYE, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.look));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 130f, 200f, 20f), this.sp.blink, 0f, 10f);
             if (num != this.sp.blink)
             {
                 this.sp.blink = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_BLINK, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.blink));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 160f, 200f, 20f), this.sp.wink_l, 0f, 10f);
             if (num != this.sp.wink_l)
             {
                 this.sp.wink_l = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_WINK_LEFT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.wink_l));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 190f, 200f, 20f), this.sp.wink_r, 0f, 10f);
             if (num != this.sp.wink_r)
             {
                 this.sp.wink_r = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_WINK_RIGHT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.wink_r));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 220f, 200f, 20f), this.sp.brow, 0f, 10f);
             if (num != this.sp.brow)
             {
                 this.sp.brow = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_EYEBROW, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.brow));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 250f, 200f, 20f), this.sp.teeth, 0f, 10f);
             if (num != this.sp.teeth)
             {
                 this.sp.teeth = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_CLENCH, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.teeth));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 280f, 200f, 20f), this.sp.smile, 0f, 10f);
             if (num != this.sp.smile)
             {
                 this.sp.smile = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_SMILE, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.smile));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 310f, 200f, 20f), this.sp.smirk_r, 0f, 10f);
             if (num != this.sp.smirk_r)
             {
                 this.sp.smirk_r = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_SMIRK_RIGHT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.smirk_r));
             }
             num = GUI.HorizontalSlider(new Rect(350f, 340f, 200f, 20f), this.sp.smirk_l, 0f, 10f);
             if (num != this.sp.smirk_l)
             {
                 this.sp.smirk_l = num;
                 EdkDll.EE_ExpressivSetThreshold(0u, EdkDll.EE_ExpressivAlgo_t.EXP_SMIRK_LEFT, EdkDll.EE_ExpressivThreshold_t.EXP_SENSITIVITY, (int)(100f * this.sp.smirk_l));
             }
         }
         catch (Exception var_1_575)
         {
             Debug.Log("Khoa khoa khoa");
             string currentDirectory = Directory.GetCurrentDirectory();
             string path             = currentDirectory + "\\setting.xml";
             if (File.Exists(path))
             {
                 File.Delete(path);
             }
         }
     }
     else
     {
         GUI.skin = this.skin5;
     }
     if (GUI.Button(new Rect(50f, 55f, 85f, 32f), "Headset"))
     {
         this.check_button1 = true;
         this.check_button2 = false;
     }
     if (this.check_button2)
     {
         GUI.DrawTexture(new Rect(34f, 120f, 200f, 200f), this.round);
         this.r = this.largeround * 200f / 12f;
         GUI.DrawTexture(new Rect((float)((int)(134f - this.r / 2f)), (float)((int)(220f - this.r / 2f)), (float)((int)this.r), (float)((int)this.r)), this.smallround);
         GUI.DrawTexture(new Rect((float)(124 + EmoGyroData.GyroX / 16), (float)(210 + EmoGyroData.GyroY / 16), 20f, 20f), this.blackButt);
         GUI.skin = this.MySkin;
         GUI.Label(new Rect(360f, 90f, 100f, 20f), "Gyro sensitivity");
         GUI.skin        = this.skin6;
         this.largeround = GUI.VerticalSlider(new Rect(400f, 120f, 20f, 200f), this.largeround, 12f, 4f);
     }
     else
     {
         GUI.skin = this.skin7;
     }
     if (GUI.Button(new Rect(133f, 55f, 85f, 32f), "Gyro"))
     {
         this.check_button2 = true;
         this.check_button1 = false;
     }
     GUI.skin = this.skin8;
     if (GUI.Button(new Rect(525f, 40f, 40f, 40f), string.Empty))
     {
         this.check         = false;
         this.check_control = false;
         this.check_button1 = true;
         this.check_button2 = false;
     }
     GUI.DragWindow();
 }