Skip to content

Frext/unity-jpp-programming-theory-project

Repository files navigation

Programming Theory Project

Unity Version Language Platform

A simple 3D game where you fight waves of enemies and pick up health packs to stay alive.

It was built in Unity to demonstrate the four pillars of Object-Oriented Programming (OOP): Inheritance, Polymorphism, Abstraction, and Encapsulation.


🚀 Quick Start

Want to skip the code and just play?

  1. Download the Repository
  2. Extract the ZIP file.
  3. Open the BuildWindows folder and launch Programming Theory Project.exe.

🎮 Controls

Key Action
W A S D Move
SPACE Jump
LEFT CLICK Attack
V Change Camera View

📸 Screenshots

Main Menu Controls
Main Menu Controls
First-Person View (Wave 1) Third-Person View (Wave 1)
First-Person View Third View
Multiple Skeleton Enemies (Wave 2) Health Pickup
Multiple Skeleton Enemies Health Pickup
Orc Enemy (Wave 3) Death Screen
Orc Enemy Death Screen

🧠 OOP Implementation

  • Inheritance: PlayerHealth and EnemyHealth inherit from HealthManager; PlayerAttack and EnemyAttack inherit from AttackManager
  • Polymorphism: PlayerAttack and EnemyAttack override the virtual Attack() method with unique behavior; TakeDamage() is overridden in PlayerHealth to update UI
  • Abstraction: WaveManager spawns waves without exposing details; ChasePlayer handles enemy AI logic; MeleeAttackHandler manages combat without exposing internals
  • Encapsulation: Health property in HealthManager uses a private _health field with protected getter/setter to control access and prevent invalid states

🛠️ Built With


2023

About

Unity Junior Programmer Pathway - Submission 2

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors