private void Start()
 {
     m_RigidBody = GetComponent<Rigidbody>();
     m_Capsule = GetComponent<CapsuleCollider>();
     mouseLook.Init (transform, cam.transform);
     playerBehavoir = gameObject.GetComponent<PlayerBehavior> ();
 }
 public void UpdateDesiredTargetSpeed(Vector2 input, PlayerBehavior playerBehavoir)
 {
     if (input == Vector2.zero) return;
     if (input.x > 0 || input.x < 0)
     {
         //strafe
         CurrentTargetSpeed = StrafeSpeed;
     }
     if (input.y < 0)
     {
         //backwards
         CurrentTargetSpeed = BackwardSpeed;
     }
     if (input.y > 0)
     {
         //forwards
         //handled last as if strafing and moving forward at the same time forwards speed should take precedence
         CurrentTargetSpeed = ForwardSpeed;
     }
     #if !MOBILE_INPUT
     if (Input.GetKey(RunKey) && playerBehavoir.requestBoostPower(.5f))
     {
         CurrentTargetSpeed *= RunMultiplier;
         m_Running = true;
     }
     else
     {
         m_Running = false;
     }
     #endif
 }
        void Start()
        {
            desiredFOV = (int)Camera.main.fieldOfView;

            playerBehavoir = gameObject.GetComponent<PlayerBehavior> ();
        }