|
- 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("SetFieldOfView")]
- class SetFOVCommandEngine : ICustomCommandEngine
- {
- public string Description => "Set the camera's field of view";
-
- public string Name => "SetFieldOfView";
-
- public IEntitiesDB entitiesDB { set; private get; }
-
- public void Ready()
- {
- CommandRegistrationHelper.Register<float>(Name, SetFieldOfViewCommand, Description);
- }
-
- private void SetFieldOfViewCommand(float newFoV)
- {
- Camera.main.fieldOfView = newFoV;
- }
-
- public void Dispose()
- {
- CommandRegistrationHelper.Unregister(Name);
- }
- }
- }
|