|
- using Svelto.ECS;
- using UnityEngine;
-
- using GamecraftModdingAPI.Commands;
-
- namespace ExtraCommands.Basics
- {
- [CustomCommand("Exit")]
- class ExitCommandEngine : ICustomCommandEngine
- {
- public string Description => "Close Gamecraft without any prompts";
-
- public string Name => "Exit";
-
- public EntitiesDB entitiesDB { set; private get; }
-
- public bool isRemovable => true;
-
- public void Ready()
- {
- CommandRegistrationHelper.Register(Name, ExitCommand, Description);
- }
-
- private void ExitCommand()
- {
- Application.Quit();
- }
-
- public void Dispose()
- {
- CommandRegistrationHelper.Unregister(Name);
- }
- }
- }
|