Unity Learn home
0
0
Catch the Ball!
26 views
Submitted as the final exercise for the Unity "Junior Programmer Pathway" and demonstrates four key object-oriented programming concepts through a ball-catching game. The game shows abstraction through the ICollectable interface and CollectableItem abstract class that define what collectables must do without specifying how, and encapsulation by keeping internal states private or protected in each ball type, GameManager, and PlayerController classes. Inheritance is implemented through the BallController base class that GoldenBall, SpeedBall, and BonusBall extend with unique behaviors, while polymorphism is demonstrated through method overloading with multiple versions of Initialize() and ApplyForce(), plus virtual methods like Move() that behave differently for each ball type despite using the same interface. https://github.com/guyewhite/unity-programming-theory-repo
Media
1
1