Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //less-OOP
- if(TheTank->bIsInGarage){
- switchWeapon(TheTank, new Gun());
- }
- switchWeapon(BluePlayer, new Gun());
- //full OOP
- if(TheTank->bIsInGarage){
- TheTank->switchWeapon(new Gun());
- }
- BluePlayer->switchWeapon(new Gun());
- //no difference.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement