Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public GameObject AddLoot
  2. {
  3. set
  4. {
  5. this.Loot.Add(value);
  6. AddLootItem(value);
  7. }
  8. }
  9.  
  10. // And then we have some call site:
  11. muh_obj.AddLoot = some_loot;
  12.  
  13. // delete the property stuff
  14. public GameObject AddLoot
  15. {
  16. this.Loot.Add(value);
  17. AddLootItem(value);
  18. }
  19.  
  20. // But we want to have a parameter
  21. public GameObject AddLoot(GameObject value)
  22. {
  23. this.Loot.Add(value);
  24. AddLootItem(value);
  25. }
  26.  
  27. // OK we gucci fam
  28. // Let's change the callsite.
  29. muh_obj.AddLoot(some_loot);
  30.  
  31. // PogChamp we r done :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement