title: Animator set float
body: <p>I am beginner in developing a game in unity3d. I just found a script for moving a character. So, I'm just confused a little bit in this script. Here's the code that I don't understand.</p>
  
  <pre><code>if (Input.GetAxis ("Vertical") == 0 &amp;&amp; Input.GetAxis ("Horizontal") == 0) {
  
         animator.SetFloat ("PlayerState", IDLE);
  }
  </code></pre>
  
  <p>I don't understand the line: <code>animator.SetFloat("PlayerState", IDLE);</code></p>
  
  <p>What is PlayerState and IDLE? I know it's a parameter. Is IDLE a variable? How does it works? Can you enlighten me guys?</p>
  
  <p>PS: On the source code that I found, you can't actually see any variables.</p>
  
  <p><strong>Added Code</strong></p>
  
  <p>Another code that I don't understand. Assume that the player holds the LShift and W key then the character will run, right? How did the script checks the animator if the character will run? Another thing is, since I have a variable RUN which has a value of 4f, will I remove the line moveSpeed = 4f; or not?</p>
  
  <p>Here is the script:</p>
  
  <pre><code>if (Input.GetKey (KeyCode.LeftShift)) {
      if (Input.GetAxis ("Vertical") &gt; 0) { 
  
          moveSpeed = 4f;
  
          Quaternion turnAngle = Quaternion.Euler (0, centerPoint.eulerAngles.y, 0);
          character.rotation = Quaternion.Slerp (character.rotation, turnAngle, Time.deltaTime * rotationSpeed);
          animator.SetFloat ("PlayerState", RUN);
      }
  }
  </code></pre>