cleanup fixing

This commit is contained in:
2023-05-21 00:48:35 +03:00
parent 280be62caa
commit d503a4789b
3 changed files with 7 additions and 24 deletions

View File

@@ -4,8 +4,6 @@ namespace Game
{
public class CameraMovement : Script
{
private readonly InputEvent onExit = new InputEvent("Exit");
private float viewPitch;
private float viewRoll;
private float viewYaw;
@@ -14,24 +12,6 @@ namespace Game
[Tooltip("Camera speed")]
public float MoveSpeed { get; set; } = 400;
public override void OnAwake()
{
base.OnAwake();
onExit.Triggered += () =>
{
if (Console.IsSafeToQuit)
Engine.RequestExit();
};
}
public override void OnDestroy()
{
base.OnDestroy();
onExit.Dispose();
}
public override void OnStart()
{
Float3 initialEulerAngles = Actor.Orientation.EulerAngles;

View File

@@ -20,10 +20,12 @@ namespace Game
foreach (MethodInfo method in methods)
{
var methodParameters = method.GetParameters();
if (methodParameters.Length != 0)
if (methodParameters.Length == 0)
method.Invoke(null, null);
else if (methodParameters.Length == 1 && methodParameters[0].ParameterType == typeof(string[]))
method.Invoke(null, new object[] { Array.Empty<string>() });
else
continue;
method.Invoke(null, null);
return;
}

View File

@@ -138,7 +138,8 @@ namespace Game
LoadConfig();
//GameMode.Connect();
GameModeManager.Init();
NetworkManager.StartServer();
//NetworkManager.StartServer();
//GameMode.StartServer(true);
}