katatunix / artemis-framework

Automatically exported from code.google.com/p/artemis-framework
0 stars 0 forks source link

Aspect checking for oneSet seems to be broken. #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an Aspect like this

Aspect.getAspectForAll(LayerComponent.class).one(PhysicsComponent.class, 
PositionComponent.class)

What is the expected output? What do you see instead?

You expect that all Entities must possess LayerComponent and one of 
PhysicsComponent/PositionComponent.

What version of the product are you using? On what operating system?

a609b2076aacc0ef5ecf0b390205d01bb88ceae2

Please provide any additional information below.

I think the issue is due to the missing check for the "interested" variable in 
check(Entity e).

// Check if the entity possesses ANY of the components in the oneSet. If so, 
the system is interested.
        if(!oneSet.isEmpty()) {
            interested = oneSet.intersects(componentBits);
        }

Original issue reported on code.google.com by senk.chr...@gmail.com on 5 Aug 2013 at 8:56