Advertisement
NPSF3000

Untitled

May 21st, 2011
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. //This is just a shortened version of
  2. ObjectsToBeSaved.ForEach(PrintList);
  3.  
  4. //This. However only List's (AFAIK) offer this ability.
  5. foreach (GameObject item in ObjectsToBeSaved)
  6. {
  7. PrintList(item);
  8. }
  9.  
  10. // This is a 'function' in C# - However it cannot return anything.
  11. void PrintList(GameObject go)
  12. {
  13. print(name + " prints " + go.name);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement