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

How to stop Game based on user Input ? #8

Open cchandel opened 3 years ago

cchandel commented 3 years ago

Hi, I need to stop a running game based on user input. Then, how can I re-start the game? Or destroy the existing world and create a new world ? Thanks.

zllangct commented 3 years ago

You can create a restart system with system evnet "Restart", user input trigger restart action by emitting "Restart". the "restart system" will reset component data to initialization state.