Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed entity from game still exist in game node lists ? #7

Closed
zvir opened this issue Jun 29, 2012 · 2 comments
Closed

removed entity from game still exist in game node lists ? #7

zvir opened this issue Jun 29, 2012 · 2 comments

Comments

@zvir
Copy link

zvir commented Jun 29, 2012

dont know if it's bug but its pissing me off.

to reproduce:

create entity.
add component A to entity
add entity to game

create node A with component A
create node B with component B

create nodeRemoved handler on nodeList A. in handler add component B to entity
create nodeAdded handler on nodeList B.

remove entity from game


result

  1. nodeAdded handler in nodeList B is fireing after removed entity form game but it should not - entity is no longer part of game and none of nodeList should be updateted after its removed.
  2. entity is no loger in game, but still exist in some nodelists
@zvir
Copy link
Author

zvir commented Jun 29, 2012

shouldn't be like this:

public function removeEntity( entity : Entity ) : void
{
entity.componentAdded.remove( componentAdded );

for each( var family : Family in families )
{
family.remove( entity );
}

entities.remove( entity );
}

@richardlord
Copy link
Owner

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants