Trying to load classes from files with inheritance
Posted: Mon Sep 23, 2024 2:36 pm
Apologies if I'm not doing this right, I registered my account mere minutes prior to writing this post.
I use 30log for classes in my game, which represent objects in the world.
In my case, all objects are loaded from their own files in a folder called "entities" and each file is provided a table called "ENT".
Additionally, they (should) automatically inherit methods from their desired entities, of whose name is defined in "ENT.__base"
Right now, what I'm trying to do is create a class for each file prior to actually loading each file and passing that class as "ENT", but it doesn't seem to work
What approach should I use for this problem?
I use 30log for classes in my game, which represent objects in the world.
In my case, all objects are loaded from their own files in a folder called "entities" and each file is provided a table called "ENT".
Additionally, they (should) automatically inherit methods from their desired entities, of whose name is defined in "ENT.__base"
Right now, what I'm trying to do is create a class for each file prior to actually loading each file and passing that class as "ENT", but it doesn't seem to work
What approach should I use for this problem?