Search found 12 matches

by Krumpet
Thu Dec 03, 2020 5:33 am
Forum: Support and Development
Topic: Advice on getting two unrelated class objects to interact
Replies: 4
Views: 1621

Advice on getting two unrelated class objects to interact

I'm building a Space Invaders clone to learn LOVE. I have a Laser class that is used in the following two places in my game. As a property of the Base class As a property of the Enemy class I believe I've set things up so the Base class and the Enemy class are encapsulated from one another (am I say...
by Krumpet
Thu Dec 03, 2020 5:18 am
Forum: Support and Development
Topic: Managing multiple class objects at same time
Replies: 9
Views: 2154

Managing multiple class objects at same time

What is the best way to structure a situation where a game has multiple instances of an object at the same time? I'm building a Space Invaders clone and have used two classes to manage the enemies: EnemyFormation and Enemy. The EnemyFormation class sets self.enemy property to a table of Enemy instan...