public void Toggle(Entity entity) { ServerComponent server = entity.Get <ServerComponent>(); MachineComponent machine = entity.Get <MachineComponent>(); server.Enabled = !server.Enabled; if (server.Enabled) { machine.Start(); } else { machine.Stop(); } }
public void Toggle(Entity entity) { ClientComponent client = entity.Get <ClientComponent>(); MachineComponent machine = entity.Get <MachineComponent>(); client.Enabled = !client.Enabled; if (client.Enabled) { machine.Start(); } else { machine.Stop(); } }
public void Stop(Entity entity) { MachineComponent machine = entity.Get <MachineComponent>(); machine.Stop(); }