///////////////////////////////////////////////////////////
 // disables all states except the default state, and enables
 // the default state for the controller and the current
 // weapon and shooter
 ///////////////////////////////////////////////////////////
 public void ResetState()
 {
     if (Controller != null)
     {
         Controller.ResetState();
     }
     if (Camera != null)
     {
         Camera.ResetState();
         if (CurrentWeapon != null)
         {
             CurrentWeapon.ResetState();
         }
         if (CurrentShooter != null)
         {
             CurrentShooter.ResetState();
         }
     }
 }
Example #2
0
 /// <summary>
 /// helper method to reset all states. for use after applying
 /// a preset to a vp_Component via script
 /// </summary>
 public void ResetState()
 {
     if (Controller != null)
     {
         Controller.ResetState();
     }
     if (Camera != null)
     {
         Camera.ResetState();
         if (WeaponHandler.CurrentWeapon != null)
         {
             WeaponHandler.CurrentWeapon.ResetState();
         }
         if (CurrentShooter != null)
         {
             CurrentShooter.ResetState();
         }
     }
     if (Input != null)
     {
         Input.ResetState();
     }
 }