OOP principles
Movement - WASD
Shoot/turbo - X
Jump - Space
Reset - E
Encapsulation: Player lives are tracked and updated within the player movement script, and other scripts interact with it through public methods like GetHit() or Die()
Inheritance: MonsterSimple (goomba) inherits from Monster.
Polymorphism: Monster is overriden in MonsterSimple allowing different movement behaviours.
Abstraction: Different hittable objects are overriden and handled from elsewhere so the details are hidden in a different place.
character asset: https://fatberry.itch.io/free-pixel-character
Leave a comment
Log in with itch.io to leave a comment.