protected override RsUnityClient CreateRsClient(ClientConfiguration configuration) { GladMMOUnityClient client = new GladMMOUnityClient(configuration, GraphicsObject, GladMMOProgram.RootGameManager); GladMMOProgram.RootClient = client; return(client); }
protected override RsUnityClient CreateRsClient(ClientConfiguration configuration) { if (RsUnityPlatform.isWebGLBuild) { //Used for Task.Delay in WebGL (Task.Delay doesn't work in WebGL directly) WebGLUnityTaskDelayFactory delayFactory = new UnityEngine.GameObject("Task Delayer").AddComponent <WebGLUnityTaskDelayFactory>(); if (RsUnityPlatform.isInEditor) { GladMMOProgram.RootClient = new GladMMORsUnityWebGLClient(configuration, GraphicsObject, this, new DefaultWebSocketClientFactory(), delayFactory, GladMMOProgram.RootGameManager); } else { GladMMOProgram.RootClient = new GladMMORsUnityWebGLClient(configuration, GraphicsObject, this, new WebGLWebSocketFactory(delayFactory), delayFactory, GladMMOProgram.RootGameManager); } } else { GladMMOUnityClient client = new GladMMOUnityClient(configuration, GraphicsObject, GladMMOProgram.RootGameManager); GladMMOProgram.RootClient = client; } return(GladMMOProgram.RootClient); }
public PathMovementGenerator([NotNull] PathBasedMovementData pathData, GladMMOUnityClient client) { MovementData = pathData ?? throw new ArgumentNullException(nameof(pathData)); Client = client; }