void Update()
 {
     if (isClickable)
     {
         if (Input.GetKeyDown(advanceKey))
         {
             if (textMesh.reading)
             {                         //is text being read out, and player has lifted up the key in this block of text?
                 textMesh.SpeedRead(); //show all text, or speed up
             }
             if (!textMesh.reading && !textMesh.unreading)
             { //call Continue(), if no need to continue, advance to next box. only when button is pressed, too
                 if (!textMesh.Continue())
                 {
                     textMesh.UnRead();
                 }
                 else
                 {
                     Debug.Log("CONTINUING NOW");
                 }
             }
         }
         if (Input.GetKeyUp(advanceKey))
         {
             textMesh.RegularRead(); //return to normal reading speed, if possible.
         }
     }
 }
예제 #2
0
 void Update()
 {
     if (Input.GetKey(advanceKey))
     {
         advanceKeySprite.transform.localScale = advanceKeyScale;             //scale key if held
     }
     else
     {
         advanceKeySprite.transform.localScale = Vector3.Lerp(advanceKeySprite.transform.localScale, advanceKeyStartScale, Time.deltaTime * advanceKeyTime);
     }
     if (Input.GetKeyDown(advanceKey))
     {
         if (textMesh.reading)                         //is text being read out, and player has lifted up the key in this block of text?
         {
             textMesh.SpeedRead();                     //show all text, or speed up
         }
         if (!textMesh.reading && !textMesh.unreading) //call Continue(), if no need to continue, advance to next box. only when button is pressed, too
         {
             if (!textMesh.Continue())
             {
                 textMesh.UnRead();
             }
             else
             {
                 Debug.Log("CONTINUING NOW");
             }
         }
     }
     if (Input.GetKeyUp(advanceKey))
     {
         textMesh.RegularRead();             //return to normal reading speed, if possible.
     }
 }
예제 #3
0
 void Update()
 {
     if (Input.GetKeyDown(key))
     {
         stm.UnRead();
         Debug.Log("Triggering Unread!");
     }
 }
예제 #4
0
 void Update()
 {
     if (Input.GetKeyDown(advanceKey))
     {
         if (textMesh.reading)             //is text being read out?
         {
             textMesh.SpeedRead();         //show all text, or speed up
         }
         else if (!textMesh.unreading)
         {
             textMesh.UnRead();
             //Apply();
         }
     }
     if (Input.GetKeyUp(advanceKey))
     {
         textMesh.RegularRead();             //return to normal reading speed, if possible.
     }
 }
 void Update()
 {
     if (Input.GetKey(advanceKey))
     {
         if (textMesh.reading)                                 //is text being read out?
         {
             textMesh.SpeedRead();                             //show all text, or speed up
         }
         else if (!textMesh.Continue() && !textMesh.unreading) //call Continue(), if no need to continue, advance to next box.
         {
             textMesh.UnRead();
             //Apply();
         }
         advanceKeySprite.transform.localScale = advanceKeyScale;
     }
     else
     {
         advanceKeySprite.transform.localScale = Vector3.Lerp(advanceKeySprite.transform.localScale, advanceKeyStartScale, Time.deltaTime * advanceKeyTime);
     }
     if (Input.GetKeyUp(advanceKey))
     {
         textMesh.RegularRead();             //return to normal reading speed, if possible.
     }
 }