Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. //less-OOP
  2. if(TheTank->bIsInGarage){
  3.     switchWeapon(TheTank, new Gun());
  4. }
  5. switchWeapon(BluePlayer, new Gun());
  6.  
  7. //full OOP
  8. if(TheTank->bIsInGarage){
  9.     TheTank->switchWeapon(new Gun());
  10. }
  11. BluePlayer->switchWeapon(new Gun());
  12.  
  13. //no difference.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement