Moar Gamecraft commands!
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

36 satır
786B

  1. using Svelto.ECS;
  2. using UnityEngine;
  3. //using Svelto.Context;
  4. using GamecraftModdingAPI.Commands;
  5. namespace ExtraCommands.Basics
  6. {
  7. [CustomCommand("SetTargetFPS")]
  8. class SetTargetFramerateCommandEngine : ICustomCommandEngine
  9. {
  10. public string Description => "Set Gamecraft's target FPS'";
  11. public string Name => "SetTargetFPS";
  12. public EntitiesDB entitiesDB { set; private get; }
  13. public bool isRemovable => true;
  14. public void Ready()
  15. {
  16. CommandRegistrationHelper.Register<int>(Name, SetFramerateCommand, Description);
  17. }
  18. private void SetFramerateCommand(int newFoV)
  19. {
  20. Application.targetFrameRate = newFoV;
  21. }
  22. public void Dispose()
  23. {
  24. CommandRegistrationHelper.Unregister(Name);
  25. }
  26. }
  27. }