LTDescr.pause C# (CSharp) Method

pause() public method

public pause ( ) : LTDescr
return LTDescr
    public LTDescr pause()
    {
        if(this.direction != 0.0f){ // check if tween is already paused
            this.directionLast =  this.direction;
            this.direction = 0.0f;
        }

        return this;
    }

Usage Example

Beispiel #1
0
 private void OnCollisionEnter(Collision collision)
 {
     if (controlType == ControlType.OneTap)
     {
         leanTweenObject.pause();
         animator.SetTrigger(lose);
         PlayDummyCharacterAnimation(lose);
         gamePlayManager.OnGameOver(false);
     }
     else
     {
         if (isJumping)
         {
             animator.speed = 0;
             PlayDummyCharacterAnimation(0, 0, true);
             leanTweenObject.pause();
             gamePlayManager.OnGameOver(false);
         }
         else
         {
             leanTweenObject.pause();
             animator.speed = 0;
             PlayDummyCharacterAnimation(0, 0, true);
             gamePlayManager.OnGameOver(false);
         }
     }
 }
All Usage Examples Of LTDescr::pause
LTDescr