DRLA-RPG/ZScript/Util.zs

23 lines
510 B
Plaintext

class Type abstract
{
static clearscope bool ClassExists(string className)
{
Class type = className;
return type != null;
}
static clearscope bool IsSubclass(string className, string parentName)
{
Class parent = parentName;
Class type = className;
return (parent && type) ? type is parent : false;
}
static clearscope bool ObjectIs(Object o, string className)
{
return ClassExists(className) ? o is className : false;
}
}