Add 3d Node.isNode (#3283)

This commit is contained in:
pandamicro
2018-09-19 19:27:09 +08:00
committed by GitHub
parent b717d9148f
commit ca5fdc3168
+5
View File
@@ -34,6 +34,11 @@ export default class Node extends BaseNode {
@property
_hasChanged = false; // has the transform changed in this frame?
// is node but not scene
static isNode (obj) {
return obj instanceof Node && (obj.constructor === Node || !(obj instanceof cc.Scene));
}
constructor (name) {
super(name);
EventTarget.call(this);