Esempio n. 1
0
        public void Start(TaskArgs args)
        {
            ConsoleHelper.WriteEmbeddedColorLine($"Started [green]SDK Console[/green] Task");
            var sdkBase = new SDKBase(_packet);

            sdkBase.Listen();
        }
Esempio n. 2
0
    void Awake()
    {
        DontDestroyOnLoad(this.gameObject);
        mInstance = this;
#if UNITY_EDITOR
        mSdkApi = new SDKBase();
#elif UNITY_ANDROID
        mSdkApi = new SDKForAndroid();
#endif
    }
Esempio n. 3
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, SDKBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Ready, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.Empty, global::Agones.Dev.Sdk.Empty>(serviceImpl.Ready));
     serviceBinder.AddMethod(__Method_Allocate, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.Empty, global::Agones.Dev.Sdk.Empty>(serviceImpl.Allocate));
     serviceBinder.AddMethod(__Method_Shutdown, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.Empty, global::Agones.Dev.Sdk.Empty>(serviceImpl.Shutdown));
     serviceBinder.AddMethod(__Method_Health, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Agones.Dev.Sdk.Empty, global::Agones.Dev.Sdk.Empty>(serviceImpl.Health));
     serviceBinder.AddMethod(__Method_GetGameServer, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.Empty, global::Agones.Dev.Sdk.GameServer>(serviceImpl.GetGameServer));
     serviceBinder.AddMethod(__Method_WatchGameServer, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Agones.Dev.Sdk.Empty, global::Agones.Dev.Sdk.GameServer>(serviceImpl.WatchGameServer));
     serviceBinder.AddMethod(__Method_SetLabel, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.KeyValue, global::Agones.Dev.Sdk.Empty>(serviceImpl.SetLabel));
     serviceBinder.AddMethod(__Method_SetAnnotation, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.KeyValue, global::Agones.Dev.Sdk.Empty>(serviceImpl.SetAnnotation));
     serviceBinder.AddMethod(__Method_Reserve, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Agones.Dev.Sdk.Duration, global::Agones.Dev.Sdk.Empty>(serviceImpl.Reserve));
 }
Esempio n. 4
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(SDKBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Ready, serviceImpl.Ready)
            .AddMethod(__Method_Allocate, serviceImpl.Allocate)
            .AddMethod(__Method_Shutdown, serviceImpl.Shutdown)
            .AddMethod(__Method_Health, serviceImpl.Health)
            .AddMethod(__Method_GetGameServer, serviceImpl.GetGameServer)
            .AddMethod(__Method_WatchGameServer, serviceImpl.WatchGameServer)
            .AddMethod(__Method_SetLabel, serviceImpl.SetLabel)
            .AddMethod(__Method_SetAnnotation, serviceImpl.SetAnnotation)
            .AddMethod(__Method_Reserve, serviceImpl.Reserve).Build());
 }