DRLA-RPG/ZScript/Util.zs
2019-04-05 22:02:56 -04:00

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;
}
}