daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Aug 21st, 2018 63 Never
  1. for (int i = lines.Length; i < 50; i++)
  2.         {
  3.             GameObject spawnedLine = Instantiate(lines[Random.Range(0, 5)], new Vector3(0, lineCenter.y, 0), Quaternion.identity);
  4.             spawnedLine.transform.localScale = new Vector3(0.2f, Random.Range(0.2f, 0.8f), 0.2f);
  5.             float lineSizeY = spawnedLine.GetComponent<SpriteRenderer>().bounds.size.y;
  6.             float lineTop = spawnedLine.transform.position.y + lineSizeY / 10;
  7.             lineCenter = new Vector3(spawnedLine.transform.position.x, lineTop + lineSizeY, spawnedLine.transform.position.z);
  8.             y++;
  9.             yield return new WaitForSeconds(.1f);
  10.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top