title: Reach external values?
body: <p>spriteManager is an instance of an external class I have,  To access PlayerHelath and selectedFrameOffset   I repeteadly have to start with:  spriteManager.  many times.</p>
  
  <pre><code>    if (spriteManager.PlayerHealth == 3)
          spriteManager.selectedFrameOffset = 0;
      else if (spriteManager.PlayerHealth == 2)
          spriteManager.selectedFrameOffset = 30;
      else if (spriteManager.PlayerHealth == 1)
          spriteManager.selectedFrameOffset = 60;
      else if (spriteManager.PlayerHealth == 0)
          spriteManager.selectedFrameOffset = 90;
  </code></pre>
  
  <p>Is there a chance I can reference the use of  spriteManager.   only 1 time and end up with this:  code,   to gain more readability ?</p>
  
  <pre><code>    if (PlayerHealth == 3)
          selectedFrameOffset = 0;
      else if (PlayerHealth == 2)
          selectedFrameOffset = 30;
      else if (PlayerHealth == 1)
          selectedFrameOffset = 60;
      else if (PlayerHealth == 0)
          selectedFrameOffset = 90;
  </code></pre>