コード例 #1
0
 private void FixedUpdate()
 {
     if (isHealingFullMeditation)
     {
         if (targetLighthHealth < initialLightHealth)
         {
             targetLighthHealth = Mathf.Clamp(targetLighthHealth + meditationIncreasingStep, 0f, initialLightHealth);
             managerUI.UpgradeTargetHealthBar(targetLighthHealth);
         }
         else
         {
             isHealingFullMeditation = false;
         }
     }
     if (currentLightHealth != targetLighthHealth)
     {
         if (currentLightHealth < targetLighthHealth)
         {
             currentLightHealth = targetLighthHealth;
         }
         else
         {
             currentLightHealth -= healthChangeStepDecrease;
         }
         managerUI.UpgradeCurrentHealthBar(currentLightHealth);
     }
     if (lightsArea[0].range > rangeTarget)
     {
         foreach (Light light in lightsArea)
         {
             light.range -= decreasingStepLight;
         }
         foreach (Light light in lightsCharacter)
         {
             light.range -= decreasingStepLight;
         }
     }
     if (isDead)
     {
         cinemachineCam.SmoothlyResetCamStats(0.1f, 0.1f, 0.1f);
     }
 }
コード例 #2
0
ファイル: PlayerFighter.cs プロジェクト: sTarBlakout/TDH-Old
 private void FixedUpdate()
 {
     //Just normal restoring camera state
     if (finishedAttackSequence && !playerCamera.IsCameraDefaultState() && !isCastGoing)
     {
         playerCamera.SmoothlyResetCamStats(0.02f, 0.02f, 0.1f);
     }
     //Decreasing camera distance for AOE spell
     if (playerCamera.IsChangingCameraDist() && playerCamera.GetCameraDistanceFromPlayer() > 5f)
     {
         if (isAttackGoing)
         {
             playerCamera.ChangeVirtualCameraStat(currentWeapon.GetAmplitudeVC(), 3, 3);
         }
         else if (isCastGoing)
         {
             playerCamera.ChangeVirtualCameraStat(0.4f, 3, 3);
         }
     }
 }