thelinuxlich / artemis_CSharp

Artemis Entity System Framework ported to C#
Other
341 stars 78 forks source link

RemoveComponent deferred until the update, fixes bug introduced in #64 #69

Closed Mephistofeles closed 9 years ago

Mephistofeles commented 10 years ago

Test for removing component is updated and passing. I also updated .gitignore to include Roslyn cache. I found some errors in the store and portable version, tests are not compiling because of the new Reflection API. I have updated them as well, but it's not included in this PR.

Mephistofeles commented 10 years ago

Ok, I will investigate why the Travis build is failing.

Mephistofeles commented 10 years ago

TestPoolableComponents is not passing. Now components are removed only in the update, just after (I think I should change it to before) the pool cleanup, so the InvalidCount in the test will always be > 0, and the while loop in the test will never end.

There is also side effect of my changes. You cannot remove one component and then add a new instance to the same entity before the update, it doesn't make sense now, but I don't see why would somebody do that.

Commit added, tests should be passing now.

thelinuxlich commented 10 years ago

I think the side effect is doable(but should be documented), what do you think @tpastor and @Maximusya?

tpastor commented 10 years ago

Any news regarding to this ?

Maximusya commented 10 years ago

I am working on a document and code to propose a unified solid approach to Add/Remove Entity/Component actions.

tpastor commented 10 years ago

how is this going ?