mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 19:12:40 +08:00
Add 3d Node.isNode (#3283)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user