Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PointsRefresh () {
- var a : float = 0.0;
- var duration : float = 2;
- while (a < 1.0)
- {
- var pointsTrans : int = Mathf.Lerp(previousPoints, playerPoints, Mathf.SmoothStep(0.0, 1.0, a));
- var splitPoints = pointsTrans.ToString().ToCharArray();
- for (var i : int = 0; i < splitPoints.length; i++)
- {
- var j = splitPoints.length - i - 1;
- if(pointsKeeper[j] != null)
- {
- pointsKeeper[j].GetComponent(fontData).Refresh(32 + Char.GetNumericValue(splitPoints[i]));
- print(playerPoints);
- }
- }
- a += Time.deltaTime * duration;
- yield WaitForSeconds (1.0 / 60);
- }
- previousPoints = playerPoints;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement