bit
のメンバーComponent Type
、およびArtemis ECSのTypeBit
とのSystemBit
メンバーの背後にある目的は何ですか?Entity
これらは、ComponentType
およびを参照する Artemis ECS の git リポジトリのスクリーン ショットEntity
です。
為にComponentType
為にEntity
これがgitへのリンクです。
https://github.com/gemserk/artemis/blob/master/src/com/artemis/EntityManager.java - addComponent 関数で調べてください。呼び出します
e.addTypeBit(type.getBit());
また、removeComponent() 呼び出し:
e.removeTypeBit(type.getBit());
つまり、エンティティ内のコンポーネントの ID にすぎません。もう 1 つの ID は、EntityManager でコンポーネント タイプを収集するためのものです。
とにかく、それは少し古い実装です。パフォーマンスが向上し、積極的に開発されているartemis-odbと呼ばれるフォークを見てください。ComponentTypeもリファクタリングされています。