Comments (3)
Hi @timjbrown ,
did you set the EntityType.CUE as state as well? If you add an enum type object as a component is fine, but if you want to check a particular value you have to set the enum value as a state:
https://github.com/dominion-dev/dominion-ecs-java/blob/main/dominion-ecs-api/README.md#class-entity
from dominion-ecs-java.
No it wasn't clear to me how states worked. I thought it referred to the state of components that already exist not an extra idea of state separate on top of that. What would you say is the canonical way to do this in Dominion? To get the CUE ball in this example? By setState() and withState()?
from dominion-ecs-java.
Ok, this is the general rule:
add a component -> you can query to find all entities that have that specific component type;
set a state -> you can filter all entities, which you have already found by component type, looking for a particular state (enum value)
from dominion-ecs-java.
Related Issues (18)
- Initial setup
- how to get component from entity HOT 2
- about thread safe HOT 14
- NullPointerException and ArrayIndexOutOfBoundsException HOT 7
- Hi @enricostara I get a new error when I add a second component `B` HOT 3
- Cannot found entity after some and/remove operation HOT 6
- I pull a request, but Iām not sure which branch should be megin into
- Add Ability to Retrieve All Entities HOT 4
- When I created entities in parallel, some errors occurred HOT 6
- When I create entities and add components in multiple threads, there are unforeseen concurrency issues HOT 8
- Question: What's the best way to save the world state and restore it? HOT 4
- Bug with Inheritance HOT 4
- Support for optional, not, relationships etc HOT 4
- `ClassIndex` does not handle duplicate identity hash codes HOT 2
- QUESTION: Is it possible to work with entities with more than 6 components? HOT 2
- QUESTION: referencing another entities and direct component access HOT 1
- NullPointerException occurs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dominion-ecs-java.