Skip to main content

Home/ Groups/ abitgames
Nan Wang

Danger Music | Royalty Free Music | Melody Loops - 0 views

  •  
    music loops shop
Nan Wang

Health Bar UI - 0 views

  • Yes, that's the way to do it. For example, this (web player). There are two textures; one for the regular graphics (using normal alpha for nice anti-aliasing) and one for the health bar (using alpha cutoff). The health bar's alpha looks like this: The non-alpha part of the texture is just a block of solid green. The code is this: Code: function Update () { renderer.material.SetFloat("_Cutoff", Mathf.InverseLerp(0, Screen.width, Input.mousePosition.x)); } This is much faster, easier, and less memory-using than having an array of circular textures.
« First ‹ Previous 181 - 186 of 186
Showing 20 items per page