Esempio n. 1
0
 void Update()
 {
     if (firstShow)
     {
         float dis = Vector3.Distance(startPoint, InGameAssetManager.i.player.transform.position);
         if (dis > distanceToShowRunUI)
         {
             AIO.sprintSpeed = runSpeed;
             UI_Movement.SetActive(false);
             UI_Run.SetActive(true);
             UI_Flashlight.SetActive(false);
         }
         else
         {
             AIO.sprintSpeed = AIO.walkSpeed;
         }
         if (GameEventManager.GetOpeningDoorNumbers() >= 1)
         {
             UI_Movement.SetActive(false);
             UI_Run.SetActive(false);
             UI_Flashlight.SetActive(true);
             GameEventManager.canUseFlashLight = true;
         }
         if (GameEventManager.GetFlashLightUsedNumbers() == 1)
         {
             UI_Movement.SetActive(false);
             UI_Run.SetActive(false);
             UI_Flashlight.SetActive(false);
             firstShow = false;
         }
     }
     else
     {
         UI_Movement.SetActive(false);
         UI_Run.SetActive(false);
         UI_Flashlight.SetActive(false);
         AIO.sprintSpeed = runSpeed;
     }
 }