Dummyrunner / LandingGame

MIT License
0 stars 0 forks source link

Add attribute "name" to LandingGameObject class #27

Open beneblubb opened 2 hours ago

beneblubb commented 2 hours ago

Problem While working with different objects, i found it very useful to be able to call them by descriptive names. Especially working with objects in dictionarys makes the code unbeleavably more easy to read.

Example obj_list[2].toggle_visibility() vs. obj_dict["debug_overlay"].toggle_visibility()

Solution Add attribute "name" to LandingGameObject. I already did locally, worked great. If desired, i will add this feature to the current version of the code.

Dummyrunner commented 1 hour ago

Maybe we should also consider a numerical unique identifier (e.g. an unsigned int) for each object. The name could then be used as an alternative tag