コード例 #1
0
ファイル: Resource.cs プロジェクト: Zaph-x/coreclr-module
 public virtual IBaseBaseObjectPool GetBaseBaseObjectPool(IEntityPool <IPlayer> playerPool,
                                                          IEntityPool <IVehicle> vehiclePool, IBaseObjectPool <IBlip> blipPool,
                                                          IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                                                          IBaseObjectPool <IColShape> colShapePool)
 {
     return(new BaseBaseObjectPool(playerPool, vehiclePool, blipPool, checkpointPool, voiceChannelPool,
                                   colShapePool));
 }
コード例 #2
0
ファイル: Resource.cs プロジェクト: Tribunal37/coreclr-module
 public virtual Module GetModule(IServer server, CSharpNativeResource cSharpNativeResource,
                                 IBaseBaseObjectPool baseBaseObjectPool,
                                 IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool, IEntityPool <IVehicle> vehiclePool,
                                 IBaseObjectPool <IBlip> blipPool,
                                 IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     return(new Module(server, cSharpNativeResource, baseBaseObjectPool, baseEntityPool, playerPool, vehiclePool,
                       blipPool, checkpointPool, voiceChannelPool));
 }
コード例 #3
0
 public BaseBaseObjectPool(IEntityPool <IPlayer> playerPool, IEntityPool <IVehicle> vehiclePool,
                           IBaseObjectPool <IBlip> blipPool,
                           IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     this.playerPool       = playerPool;
     this.vehiclePool      = vehiclePool;
     this.blipPool         = blipPool;
     this.checkpointPool   = checkpointPool;
     this.voiceChannelPool = voiceChannelPool;
 }
コード例 #4
0
 public AsyncModule(IServer server, CSharpNativeResource cSharpNativeResource,
                    IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
                    IEntityPool <IVehicle> vehiclePool,
                    IBaseObjectPool <IBlip> blipPool,
                    IBaseObjectPool <ICheckpoint> checkpointPool,
                    IBaseObjectPool <IVoiceChannel> voiceChannelPool) : base(server, cSharpNativeResource, baseBaseObjectPool,
                                                                             baseEntityPool, playerPool, vehiclePool, blipPool,
                                                                             checkpointPool, voiceChannelPool)
 {
     AltAsync.Setup(this);
 }
コード例 #5
0
 public override Core GetCore(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IBaseBaseObjectPool baseBaseObjectPool,
                              IBaseEntityPool baseEntityPool,
                              IEntityPool <IPlayer> playerPool,
                              IEntityPool <IVehicle> vehiclePool,
                              IBaseObjectPool <IBlip> blipPool,
                              IBaseObjectPool <ICheckpoint> checkpointPool,
                              IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                              IBaseObjectPool <IColShape> colShapePool,
                              INativeResourcePool nativeResourcePool)
 {
     return(new AsyncCore(nativePointer, resourcePointer, assemblyLoadContext, library, baseBaseObjectPool, baseEntityPool, playerPool, vehiclePool, blipPool, checkpointPool, voiceChannelPool, colShapePool, nativeResourcePool));
 }
コード例 #6
0
 public virtual Module GetModule(IServer server,
                                 AssemblyLoadContext assemblyLoadContext,
                                 INativeResource cSharpNativeResource,
                                 IBaseBaseObjectPool baseBaseObjectPool,
                                 IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool, IEntityPool <IVehicle> vehiclePool,
                                 IBaseObjectPool <IBlip> blipPool,
                                 IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                                 IBaseObjectPool <IColShape> colShapePool,
                                 INativeResourcePool nativeResourcePool)
 {
     return(new Module(server, assemblyLoadContext, cSharpNativeResource, baseBaseObjectPool, baseEntityPool, playerPool, vehiclePool,
                       blipPool, checkpointPool, voiceChannelPool, colShapePool, nativeResourcePool));
 }
コード例 #7
0
 public AsyncModule(IServer server, AssemblyLoadContext assemblyLoadContext, INativeResource moduleResource,
                    IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
                    IEntityPool <IVehicle> vehiclePool,
                    IBaseObjectPool <IBlip> blipPool,
                    IBaseObjectPool <ICheckpoint> checkpointPool,
                    IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                    IBaseObjectPool <IColShape> colShapePool,
                    INativeResourcePool nativeResourcePool) : base(server, assemblyLoadContext, moduleResource,
                                                                   baseBaseObjectPool,
                                                                   baseEntityPool, playerPool, vehiclePool, blipPool,
                                                                   checkpointPool, voiceChannelPool, colShapePool, nativeResourcePool)
 {
     AltAsync.Setup(this);
 }
コード例 #8
0
 internal MockServer(IntPtr nativePointer, IBaseBaseObjectPool baseBaseObjectPool,
                     IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
                     IEntityPool <IVehicle> vehiclePool,
                     IBaseObjectPool <IBlip> blipPool,
                     IBaseObjectPool <ICheckpoint> checkpointPool,
                     IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     this.nativePointer      = nativePointer;
     this.baseBaseObjectPool = baseBaseObjectPool;
     this.baseEntityPool     = baseEntityPool;
     this.playerPool         = playerPool;
     this.vehiclePool        = vehiclePool;
     this.blipPool           = blipPool;
     this.checkpointPool     = checkpointPool;
     this.voiceChannelPool   = voiceChannelPool;
 }
コード例 #9
0
ファイル: Module.cs プロジェクト: Tribunal37/coreclr-module
 public Module(IServer server, CSharpNativeResource cSharpNativeResource, IBaseBaseObjectPool baseBaseObjectPool,
               IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
               IEntityPool <IVehicle> vehiclePool,
               IBaseObjectPool <IBlip> blipPool,
               IBaseObjectPool <ICheckpoint> checkpointPool,
               IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     Alt.Init(this);
     Server = server;
     CSharpNativeResource = cSharpNativeResource;
     BaseBaseObjectPool   = baseBaseObjectPool;
     BaseEntityPool       = baseEntityPool;
     PlayerPool           = playerPool;
     VehiclePool          = vehiclePool;
     BlipPool             = blipPool;
     CheckpointPool       = checkpointPool;
     VoiceChannelPool     = voiceChannelPool;
 }
コード例 #10
0
 public Server(IntPtr nativePointer, INativeResource resource, IBaseBaseObjectPool baseBaseObjectPool,
               IBaseEntityPool baseEntityPool,
               IEntityPool <IPlayer> playerPool,
               IEntityPool <IVehicle> vehiclePool,
               IBaseObjectPool <IBlip> blipPool,
               IBaseObjectPool <ICheckpoint> checkpointPool,
               IBaseObjectPool <IVoiceChannel> voiceChannelPool,
               IBaseObjectPool <IColShape> colShapePool,
               INativeResourcePool nativeResourcePool)
 {
     NativePointer           = nativePointer;
     this.baseBaseObjectPool = baseBaseObjectPool;
     this.baseEntityPool     = baseEntityPool;
     this.playerPool         = playerPool;
     this.vehiclePool        = vehiclePool;
     this.blipPool           = blipPool;
     this.checkpointPool     = checkpointPool;
     this.voiceChannelPool   = voiceChannelPool;
     this.colShapePool       = colShapePool;
     this.nativeResourcePool = nativeResourcePool;
     Resource = resource;
 }
コード例 #11
0
        public Server(IntPtr nativePointer, CSharpNativeResource resource, IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool,
                      IEntityPool <IPlayer> playerPool,
                      IEntityPool <IVehicle> vehiclePool,
                      IBaseObjectPool <IBlip> blipPool,
                      IBaseObjectPool <ICheckpoint> checkpointPool,
                      IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                      IBaseObjectPool <IColShape> colShapePool)
        {
            NativePointer           = nativePointer;
            this.baseBaseObjectPool = baseBaseObjectPool;
            this.baseEntityPool     = baseEntityPool;
            this.playerPool         = playerPool;
            this.vehiclePool        = vehiclePool;
            this.blipPool           = blipPool;
            this.checkpointPool     = checkpointPool;
            this.voiceChannelPool   = voiceChannelPool;
            this.colShapePool       = colShapePool;
            var ptr = IntPtr.Zero;

            AltNative.Server.Server_GetRootDirectory(nativePointer, ref ptr);
            RootDirectory = Marshal.PtrToStringUTF8(ptr);
            Resource      = resource;
        }
コード例 #12
0
        public NativePlayer(JSObject player, IBaseObjectPool <IPlayer> playerPool)
        {
            this.player     = player;
            this.playerPool = playerPool;

            /*var vector3 = (JSObject) alt.GetObjectProperty("Vector3");
            *  var vector3Prototype = (JSObject) vector3.GetObjectProperty("prototype");
            *  var vector3Instance2 = (JSObject) vector3Prototype.Invoke("constructor",1.0, 2.0, 3.0);
            *  Console.WriteLine(vector3Instance2?.GetType().Name);
            *  Console.WriteLine(vector3Instance2?.GetObjectProperty("x"));
            *  Console.WriteLine(vector3Instance2?.GetObjectProperty("y"));
            *  Console.WriteLine(vector3Instance2?.GetObjectProperty("z"));
            *  var vector3Constructor = (Function) vector3Prototype.GetObjectProperty("constructor");
            *  var vector3Instance = (JSObject) vector3Constructor.Call(null, 1.0, 2.0, 3.0);
            *  Console.WriteLine(vector3Instance?.GetType().Name);
            *  Console.WriteLine(vector3Instance.GetObjectProperty("x"));
            *  Console.WriteLine(vector3Instance.GetObjectProperty("y"));
            *  Console.WriteLine(vector3Instance.GetObjectProperty("z"));*/
            //local = (Function) ((JSObject)player.GetObjectProperty("constructor")).GetObjectProperty("local");
            //local = (Function) player.GetObjectProperty("local");
            //id = (Function) player.GetObjectProperty("id");
            //name = (Function) player.GetObjectProperty("name");
        }
コード例 #13
0
 public BaseBaseObjectPool(
     IEntityPool <IPlayer> playerPool,
     IEntityPool <IVehicle> vehiclePool,
     IBaseObjectPool <IBlip> blipPool,
     IBaseObjectPool <ICheckpoint> checkpointPool,
     IBaseObjectPool <IAudio> audioPool,
     IBaseObjectPool <IHttpClient> httpClientPool,
     IBaseObjectPool <IWebSocketClient> webSocketClientPool,
     IBaseObjectPool <IWebView> webViewPool,
     IBaseObjectPool <IRmlElement> rmlElementPool,
     IBaseObjectPool <IRmlDocument> rmlDocumentPool
     )
 {
     this.playerPool          = playerPool;
     this.vehiclePool         = vehiclePool;
     this.blipPool            = blipPool;
     this.checkpointPool      = checkpointPool;
     this.audioPool           = audioPool;
     this.httpClientPool      = httpClientPool;
     this.webSocketClientPool = webSocketClientPool;
     this.webViewPool         = webViewPool;
     this.rmlElementPool      = rmlElementPool;
     this.rmlDocumentPool     = rmlDocumentPool;
 }
コード例 #14
0
 public Core(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IBaseBaseObjectPool baseBaseObjectPool,
             IBaseEntityPool baseEntityPool,
             IEntityPool <IPlayer> playerPool,
             IEntityPool <IVehicle> vehiclePool,
             IBaseObjectPool <IBlip> blipPool,
             IBaseObjectPool <ICheckpoint> checkpointPool,
             IBaseObjectPool <IVoiceChannel> voiceChannelPool,
             IBaseObjectPool <IColShape> colShapePool,
             INativeResourcePool nativeResourcePool) : base(nativePointer, library)
 {
     this.assemblyLoadContext   = new WeakReference <AssemblyLoadContext>(assemblyLoadContext);
     this.BaseBaseObjectPool    = baseBaseObjectPool;
     this.BaseEntityPool        = baseEntityPool;
     this.PlayerPool            = playerPool;
     this.VehiclePool           = vehiclePool;
     this.BlipPool              = blipPool;
     this.CheckpointPool        = checkpointPool;
     this.VoiceChannelPool      = voiceChannelPool;
     this.ColShapePool          = colShapePool;
     this.NativeResourcePool    = nativeResourcePool;
     this.vehicleModelInfoCache = new();
     nativeResourcePool.GetOrCreate(this, resourcePointer, out var resource);
     Resource = resource;
 }
コード例 #15
0
 public MockBaseBaseObjectPool(IEntityPool <IPlayer> playerPool, IEntityPool <IVehicle> vehiclePool,
                               IBaseObjectPool <IBlip> blipPool,
                               IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool) : base(
         playerPool, vehiclePool, blipPool, checkpointPool, voiceChannelPool)
 {
 }