- Code: Select all • Expand view
mixin class Worms {}
class Can : Actor
{
mixin Worms;
States
{
Spawn:
ACAN A -1;
Stop;
}
}
A simple check like this:
- Code: Select all • Expand view
Actor actCan = SomehowGetActor();
if (actCan is "Worms") {console.printf("we have worms!");}
errors out with an "Unknown class name Worms of type Object", so apparently that's a no go, and I'm fresh out of ideas.
Any kind of smart trickery I can implement to solve this problem? I'd have a ton of items in my project, some of them need a certain additional mixin for functionality, but building and maintaining a list of objects to compare each item to would seem like a slower, more mundane solution. Help and input appreciated as always, thank you for your time!