|
- using System;
- using RobocraftX.GUI.CommandLine;
- using RobocraftX.Multiplayer;
- using RobocraftX.StateSync;
- using RobocraftX.Character;
- using Svelto.ECS;
- using Unity.Entities;
- using UnityEngine;
- using uREPL;
- using Svelto.Context;
- using RobocraftX;
-
- namespace ExtraCommands.Basics
- {
- [CustomCommand("Exit", "Forcefully close Gamecraft")]
- class ExitCommandEngine : CustomCommandEngine
- {
- public ExitCommandEngine(UnityContext<FullGameCompositionRoot> ctxHolder, EnginesRoot enginesRoot, World physW, Action reloadGame, MultiplayerInitParameters mpParams) : base(ctxHolder, enginesRoot, physW, reloadGame, mpParams)
- {
- }
-
- public override void Ready()
- {
- uREPL.RuntimeCommands.Register("Exit", ExitCommand, "Forcefully close Gamecraft");
- }
-
- private void ExitCommand()
- {
- Application.Quit();
- }
-
- public override void Dispose()
- {
- uREPL.RuntimeCommands.Unregister("Exit");
- }
- }
- }
|