Skip to content

在newGame前addComponent不会生效 #188

Description

@fanmingfei

原因:

  • System被添加的以后才会对component的变化进行收集,new Game 以后才会添加System。
  • 另外在设计的时候还要考虑Observer是全局单例的这个问题。

目前a11y解决方案是,加入system的时候,遍历整个gameObjects,找到现有的A11yComponent,添加a11yDom,这种方案问题在于组件要单独去实现。

解决方案:
addSystem的时候去遍历所有Component(new Game的时候另外统一遍历),对添加之前的组件进行一次收集,在下一次update中进行创建。

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions