|
- 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;
-
- using GamecraftModdingAPI.Commands;
-
- namespace ExtraCommands.Basics
- {
- [CustomCommand("Wait")]
- class WaitCommandEngine : ICustomCommandEngine
- {
- public string Description => "Delay execution (freeze the game) for a length of time (ms)";
-
- public string Name => "Wait";
-
- public IEntitiesDB entitiesDB { set; private get; }
-
- public void Ready()
- {
- CommandRegistrationHelper.Register<int>("Wait", WaitCommand, "Delay execution (freeze the game) for a length of time (ms)");
- }
-
- private void WaitCommand(int ms)
- {
- System.Threading.Thread.Sleep(ms);
- }
-
- public void Dispose()
- {
- CommandRegistrationHelper.Unregister("Wait");
- }
- }
- }
|