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

RenderSystem中得到的弹幕集合顺序有问题(亲身验证) #30

Open
HpBoss opened this issue Jul 7, 2022 · 1 comment
Open

Comments

@HpBoss
Copy link

HpBoss commented Jul 7, 2022

image
如果在相邻时间内有五条弹幕,每当消失一条弹幕,弹幕集合内容发生变化,正常逻辑应该是index为0的弹幕元素被移除,可是在RenderSystem中的entities中获取到的弹幕集合,不仅仅是最前面的弹幕被清除了,而且也把最后的弹幕放到了最前面;表现:如果允许overlap,那么可能一开始一直在最上层的弹幕,当有弹幕完全消失时,弹幕层级会发生变化;
eg:
五条弹幕:A、B、C、D、E;
此时第一条弹幕消失后entities集合元素顺序:E、B、C、D;
此时第二条弹幕消失后entities集合元素顺序:E、D、C;
这个ECS其中具体怎样实现元素remove和sort的,在其它入口(DanmakuSortedSystem、DataSystem)我也都查看了弹幕集合sort顺序,发现都是正常的,请问原作者了解这个问题根源在哪吗?

@HpBoss
Copy link
Author

HpBoss commented Jul 7, 2022

image
目前我自己在entities filter之前重新sort一遍也能避免这种问题,但是有点影响效率。我对这个ECS不是很了解,希望可以一起探讨学习一下具体是什么原因。

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

1 participant