zllangct / ecs

A Go-implementation of the ECS (Entity-Component-System), focus on the development of game server.
BSD 3-Clause "New" or "Revised" License
132 stars 10 forks source link

How can I delete an Entity ? #11

Closed cchandel closed 2 years ago

cchandel commented 2 years ago

Once an entity's health becomes 0, how can I delete it from a system?

trying

ecs.EntityDestroy(w.World(), data.M.Owner().Entity())

stops the program.

zllangct commented 2 years ago

EntityDestroy with deadlock was fixed