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
138 stars 9 forks source link

How can I delete an Entity ? #11

Closed cchandel closed 3 years ago

cchandel commented 3 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 3 years ago

EntityDestroy with deadlock was fixed