Why did we make a new game object and a new script called Level?

It just seems weird to me, because if I wanted to do something like that I’d do it using the script I created for my Block game object, since it all relates to it.

Hi Haisp,

Welcome to our forum! :slight_smile:

We follow the single responsibility principle, which is one of the main principles of object-oriented programming. A block is a block. It does not handle level related things. For this reason, we created the Level script. And for reasons of organisation, we assigned it to a new game object. This way, we can destroy our blocks without affecting anything crucial in our game play.

Does that make sense?

1 Like

Oh, alright, that does make sense. Thanks for answering my question.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.