Moar Gamecraft commands!
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

42 wiersze
939B

  1. using System;
  2. using RobocraftX.GUI.CommandLine;
  3. using RobocraftX.Multiplayer;
  4. using RobocraftX.StateSync;
  5. using RobocraftX.Character;
  6. using Svelto.ECS;
  7. using Unity.Entities;
  8. using UnityEngine;
  9. using uREPL;
  10. using Svelto.Context;
  11. using RobocraftX;
  12. using GamecraftModdingAPI.Commands;
  13. namespace ExtraCommands.Basics
  14. {
  15. [CustomCommand("SetTargetFPS")]
  16. class SetTargetFramerateCommandEngine : ICustomCommandEngine
  17. {
  18. public string Description => "Set Gamecraft's target FPS'";
  19. public string Name => "SetTargetFPS";
  20. public IEntitiesDB entitiesDB { set; private get; }
  21. public void Ready()
  22. {
  23. CommandRegistrationHelper.Register<int>(Name, SetFramerateCommand, Description);
  24. }
  25. private void SetFramerateCommand(int newFoV)
  26. {
  27. Application.targetFrameRate = newFoV;
  28. }
  29. public void Dispose()
  30. {
  31. CommandRegistrationHelper.Unregister(Name);
  32. }
  33. }
  34. }