コード例 #1
0
 public void ResetToZero(bool immediately = false)
 {
     _turns          = 0;
     PercentComplete = 0;
     _actualGearAxis.localRotation = Quaternion.Euler(0, 180, PercentComplete * 180);
     _state = State.Idle;
     _poweredLight.SetLit(false, immediately);
 }
コード例 #2
0
 public void RegisterPoweredLight(PoweredLight light)
 {
     _poweredLights.Add(light);
     if (light.IsEmergencyLight)
     {
         light.SetLit(!HasPower, immediately: true);
     }
     else
     {
         light.SetLit(HasPower, immediately: true);
     }
 }
コード例 #3
0
 public void SetFuseState(FuseState newState, bool immediately = false)
 {
     State = newState;
     _badFuse.SetActive(newState == FuseState.Bad);
     _goodFuse.SetActive(newState == FuseState.Good);
     _poweredLight.SetLit((newState == FuseState.Good), immediately);
     if (newState == FuseState.Good)
     {
         _door.Close(immediately);
     }
     else if (newState == FuseState.Empty)
     {
         if (immediately == false)
         {
             _fuseRemove.Play();
         }
     }
 }