Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LinkedList<BoxCollider> list = new LinkedList<BoxCollider>();
- LinkedListNode<BoxCollider> current;
- void Awake()
- {
- list.AddLast(new BoxCollider);
- current = list.First;
- }
- OnTriggerEnter(BoxCollider collidedWith)
- {
- if(collidedWith == current.Value)
- {
- current = current.Next;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement