Comments (6)
@metaphore i'll improve the javadoc, it's a bit confusing indeed :-)
from ashley.
The example code actually outputs
SystemAttachComponent 1
SystemC 1
I'm not exactly sure how the example should demonstrate the described problem, but I definitely see a mistake in the usage of engine.getEntitiesFor()
. From the method's javadoc:
Returns immutable collection of entities for the specified {@link Family}. Will return the same instance every time.
You shouldn't keep the reference to the returned collection, but instead, persist the result using your own instance.
from ashley.
@metaphore it actually returns the same instance for a given Family filter, it's the typical usage, just like in IteratingSystem.
@ZumiKua and @metaphore which versions are you testing this code against? my guess is it's fixed in master branch.
from ashley.
@mgsx-dev doh, I should really dig deeper than javadocs haha. Thanks for pointing out.
Hard to tell which commit I'm on, I'm using 1.7.4-SNAPSHOT
.
from ashley.
i can confirm it's fixed, @ZumiKua you can use either 1.7.4-SNAPSHOT or jitpack: "com.github.libgdx:ashley:master-SNAPSHOT"
from ashley.
Sorry for my late reply, I'm using 1.7.3
, which is bundled with the newest(I guess) gdx-setup.
Maybe gdx-setup needs to be updated?
Anyway, thanks for your help ❤️
from ashley.
Related Issues (20)
- GWT build fails HOT 4
- Kotlin coroutine support HOT 2
- Make removed flag of entity accesable HOT 4
- Iterating system updates entities after they have been removed engine HOT 2
- Ashley should not let you add multiple of the same component to an entity HOT 4
- How to avoid unimplemented poolable component? HOT 1
- Unable to access hasComponent method on Entity HOT 2
- how is the compent managed in memory? HOT 1
- Is this project still alive? Thank you. HOT 7
- en
- ImGui wiki page not linked in Home HOT 1
- Html is not supported HOT 1
- [Question] Variable assignments at system update method HOT 1
- PooledEntity instances are not reset() if their pool is full
- Removing an entity before it was added leads to unexpected behaviour. HOT 3
- "Getting Started" guide uses deprecated Gradle syntax HOT 1
- Add system with lower priority during iteration HOT 1
- Add/Remove system improvement HOT 2
- Add a module-info.java
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 ashley.