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 to stop Game based on user Input ? #8

Open cchandel opened 2 years ago

cchandel commented 2 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 2 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.