+ 2
Python 3 - OOP Tutorial - simple RPG, proceeding where the course ended
Hey Folks, I tried to build up on what the Object Oriented Programming lesson gave us with the simple RPG. https://code.sololearn.com/cEe96ILTtVPm/#py I'm kind of stuck now though - how can I create multiple instances of the subclass Goblin now? Iterating through GameObject.objects will always just have one object Goblin, right? Help me out here, I'm lost with OOP.
1 Answer
+ 4
I didnât check your whole code, but writing:
class Goblin(Enemy):
pass
gob1 = Goblin()
gob2 = Goblin()
(or a similar thing) should instantiate multiple goblins.