コード例 #1
0
ファイル: DI_A320Throttle.cs プロジェクト: bm98/FS20_HudBar
 private void TSetValue(V_Text value, float tPerc)
 {
     if (tPerc > 0.99f)
     {
         // nominal 100%
         value.Text          = c_tTOGA;
         value.ItemForeColor = cInfo;
     }
     else if (tPerc > 0.93f)
     {
         // nominal 95%
         value.Text          = c_tMCL;
         value.ItemForeColor = cInfo;
     }
     else if (tPerc > 0.85f)
     {
         // nominal 89%
         value.Text          = c_tCL;
         value.ItemForeColor = cInfo;
     }
     else if (tPerc > 0.01)
     {
         // nominal > 0%
         value.Text          = c_tATRH;
         value.ItemForeColor = cInfo;
     }
     else if (tPerc > -0.01)
     {
         // nominal 0%
         value.Text          = c_tIDLE;
         value.ItemForeColor = cInfo;
     }
     else
     {
         // nominal < 0% .. -20%
         value.Text          = c_tREV;
         value.ItemForeColor = cWarn;
     }
 }
コード例 #2
0
    IEnumerator waiter()
    {
        V_Text      textComp = textObj.GetComponent <V_Text>();
        AudioSource sound    = GetComponentInChildren <AudioSource>();

        //Rotate 90 deg
        textComp.setText("Hello welcome to Calmo.");

        iTween.ScaleTo(this.layerZeroObj, iTween.Hash("x", 1, "y", 1, "easetype", "easeInOutExpo", "time", 2));
        iTween.ScaleTo(this.layerOneObj, iTween.Hash("x", 1.2, "y", 1.2, "easetype", "easeInOutExpo", "time", 2.1));
        iTween.ScaleTo(this.layerTwoObj, iTween.Hash("x", 1.2, "y", 1.2, "easetype", "easeInOutExpo", "time", 2.1));
        iTween.ScaleTo(this.layerThreeObj, iTween.Hash("x", 1.2, "y", 1.2, "easetype", "easeInOutExpo", "time", 2.1));
        iTween.ScaleTo(this.layerFourObj, iTween.Hash("x", 1.2, "y", 1.2, "easetype", "easeInOutExpo", "time", 2.1));

        yield return(new WaitForSeconds(5));

        textComp.setText("Calmo helps to synchronize \n breathing by displaying an easy to follow pattern.");

        yield return(new WaitForSeconds(5));

        textComp.setText("As the pattern expands breathe in.");
        InvokeRepeating("startBreathing", 0f, intervalTime);
        sound.Play();

        yield return(new WaitForSeconds(4));

        textComp.setText("And Hold your breathe.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Breathe out.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Keep it out.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Breathe in.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Hold.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Breathe out.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Keep following the pattern.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Breathe in.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Hold.");

        yield return(new WaitForSeconds(4));

        textComp.setText("Breathe out.");

        yield return(new WaitForSeconds(4));

        textComp.setText(" ");
    }