Advertisement
Creativeeart

BookPlacement.cs

Sep 2nd, 2020
1,253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. public void BookPlacement()
  2.     {
  3.         GameObject ins;
  4.         InsPlacementsBooks = new GameObject[ListLikeArrays.Length];
  5.         for (int i = 0; i < ListLikeArrays.Length; i++)
  6.         {
  7.             for (int j = 0; j < ListLikeArrays.Length; j++)
  8.             {
  9.                 if (BookLikes[j].CountLikes == ListLikeArrays[i])
  10.                 {
  11.                     ins = Instantiate(BookLikes[j].gameObject, PlaceParents[i].transform);
  12.                     ins.transform.localPosition = Vector3.zero;
  13.                     ins.transform.localEulerAngles = Vector3.zero;
  14.                     ins.tag = "CloneBook";
  15.                 }
  16.             }
  17.             if (i >= 9) break;
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement