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

Implement a 'get children()' method in Action so extended classes can override it #30

Open
jbcpollak opened this issue May 27, 2016 · 0 comments

Comments

@jbcpollak
Copy link
Contributor

jbcpollak commented May 27, 2016

Currently we do something like this to fake it in a custom Action:

    constructor(child1, child2) {
        super();
        this.child1 = child1;
        this.child2 = child2;
        // TODO: this is a hack to render the tree
        // Implement getChildren() method in Blueshell
        this.children = [child1, child2];
    }

The onEvent(state, event) method doesn't use any of the existing child-handling support to decide which child to call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant