duck

duck

Dec 3rd, 2010
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. float reelPos;
  2.  
  3. void MoveReel()
  4. {
  5.     reelPos += ReelSpeed;
  6.  
  7.     for (int x = 0; x < Symbols.Length; x++)
  8.     {
  9.                 float symbolPos = reelPos + (x * symbolHeight);
  10.         float wrappedPos = Mathf.Repeat(symbolPos, Symbols.Length * symbolHeight);
  11.         Symbols[x].transform.position = new Vector3(transform.position.x, wrappedPos ,transform.position.z);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment