Esempio n. 1
0
 public void UpdateTime()
 {
     Variable?.UpdateTime();
     if (!isConstantStopped && !isConstantFinished)
     {
         ConstantRemainingTime = Mathf.Max(0f, ConstantDuration - (Time.time - startTime));
         if (ConstantRemainingTime == 0)
         {
             isConstantFinished = true;
         }
     }
 }
Esempio n. 2
0
    private void UpdateParameters()
    {
        IsGrounded.Value        = charMotor.GroundingStatus.FoundAnyGround;
        IsOnSlidebleSlope.Value = StandingOnSlideableSlope();
        BaseVelocity.Value      = charMotor.BaseVelocity;
        groundInfo             = GetGroundInfo();
        DistanceToGround.Value = groundInfo.distance;
        GroundSlamCooldownTimer.UpdateTime();

        if (!LastGroundingStatus.FoundAnyGround && GroundingStatus.FoundAnyGround)
        {
            BecameGrounded.Activate();
        }

        else if (LastGroundingStatus.FoundAnyGround && !GroundingStatus.FoundAnyGround)
        {
            BecameUngrounded.Activate();
        }
    }