using Svelto.ECS; using UnityEngine; //using Svelto.Context; using GamecraftModdingAPI.Commands; namespace ExtraCommands.Basics { [CustomCommand("SetTargetFPS")] class SetTargetFramerateCommandEngine : ICustomCommandEngine { public string Description => "Set Gamecraft's target FPS'"; public string Name => "SetTargetFPS"; public EntitiesDB entitiesDB { set; private get; } public bool isRemovable => true; public void Ready() { CommandRegistrationHelper.Register(Name, SetFramerateCommand, Description); } private void SetFramerateCommand(int newFoV) { Application.targetFrameRate = newFoV; } public void Dispose() { CommandRegistrationHelper.Unregister(Name); } } }