Here we mainly discuss the implementation of a similar LOL-capable cooling.
1, the use of Ngui in the filled sprite to achieve. Simply set the type of the sprite of the mask layer to Filled,filldir to Radial360, and then control the fill amount. Such as
2, the use of shader to achieve, the original is also very simple, set an alpha increment mask map, set a threshold, alpha is larger than the threshold of the partial opacity, less than the threshold of transparency, so that we can change the size of this threshold to achieve the desired effect. In shader, to determine whether or not to display based on the size of the alpha value, we can use alpha test, or we can set Alpha to 0 or 1 directly based on the alpha value. For example:
Half4 Frag (v2f i): color{fixed4 C = tex2d (_maintex, I.UV); Fixed a = tex2d (_masktex, I.UV). A;C.A *= a >= _threshold? 0 F:1f;return C;}
The mask map used here is as follows:
Skill Cooling effect-[unity]