Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base-node里面的detachChild方法的parent使用有问题。 #113

Closed
zilongshanren opened this issue Dec 23, 2015 · 0 comments
Closed

Comments

@zilongshanren
Copy link
Contributor

  _detachChild: function (child, doCleanup) {
        // IMPORTANT:
        //  - 1st do onExit
        //  - 2nd cleanup
        //if (this._running) {
        //    child.onExitTransitionDidStart();
        //    child.onExit();
        //}

        // If you don't do cleanup, the child's actions will not get removed and the
        if (doCleanup)
            child.cleanup();

        child.parent = null;
        cc.js.array.remove(this._children, child);
        this.emit(CHILD_REMOVED, child);
    },

以前的child.parent=null只是一个单纯的属性赋值,现在却变成了一个方法调用。

@pandamicro 这个有问题。

YunHsiao pushed a commit to YunHsiao/engine that referenced this issue Jan 24, 2019
bofeng-song pushed a commit to bofeng-song/engine that referenced this issue Nov 29, 2021
[refine] add super construct called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant