The DOTS project used for the presentation Converting Your Game to DOTS and contains an example of how DOTS could be used to replace a low performance process in your games (shooting many bullets at once, in this case). This is meant to provide a simple, targeted example. A video presentation of this project can be seen here
This project uses a combination of game objects and entities together. In this case, the player (game objets) spawns bullets (entity). There is an Enemy Spawner (game object) that spawns enemies (entities). When enemies die, they spawn particle effects (game objects).
Since the bullets and enemies are entities and the player is a game object, making them collide with the built in physics system won't work. As such, collision is handled by a system (CollisionSystem) and is very simplistic in nature. In this system general radius is used to calculate if bullets have collided with enemies or enemies with players. A more sophisticted collision algorithm, or even the new DOTS physics, could have been used, but this is meant to be a simple example and really isn't necessary.
Several systems are used to replace the monobehaviour functionality of the bullets and enemies
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。