예제 #1
0
 public void Value(IBlip value)
 {
     if (currents.TryPeek(out currCurr))
     {
         currCurr.Values.Add(value);
     }
 }
예제 #2
0
 public void RemoveBlip(IBlip blip)
 {
     if (blip.Exists)
     {
         AltNative.Server.Server_DestroyBlip(NativePointer, blip.NativePointer);
     }
 }
예제 #3
0
        public static MValue Create(IBlip blip)
        {
            var mValue = Nil;

            AltNative.MValueCreate.MValue_CreateBlip(blip.NativePointer, ref mValue);
            return(mValue);
        }
예제 #4
0
 public void RemoveBlip(IBlip blip)
 {
     CheckIfCallIsValid();
     if (blip.Exists)
     {
         AltNative.Server.Server_DestroyBlip(NativePointer, blip.NativePointer);
     }
 }
        public static bool TryToAsync(this IBlip thisValue, IAsyncContext asyncContext, out IBlip blip)
        {
            if (!asyncContext.CreateRef(thisValue, true))
            {
                blip = default;
                return(false);
            }

            blip = new AsyncBlip(thisValue, asyncContext);
            return(true);
        }
예제 #6
0
 public void RemoveBlip(IBlip blip)
 {
     CheckIfCallIsValid();
     if (blip.Exists)
     {
         unsafe
         {
             Library.Shared.Core_DestroyBaseObject(NativePointer, blip.BaseObjectNativePointer);
         }
     }
 }
    public static void CreateLocked(IBlip blip, out MValueConst mValue)
    {
        lock (blip)
        {
            if (!blip.Exists)
            {
                mValue = MValueConst.Nil;
                return;
            }

            Alt.Core.CreateMValueBaseObject(out mValue, blip);
        }
    }
예제 #8
0
        public static void CreateLocked(IBlip blip, out MValueConst mValue)
        {
            lock (blip)
            {
                if (!blip.Exists)
                {
                    mValue = MValueConst.Nil;
                    return;
                }

                Alt.Server.CreateMValueBlip(out mValue, blip);
            }
        }
예제 #9
0
 public AsyncBlipRef(IBlip blip)
 {
     if (blip == null)
     {
         this.blip = null;
     }
     else
     {
         lock (blip)
         {
             this.blip = blip.AddRef() ? blip : null;
         }
     }
 }
예제 #10
0
        public static MValue CreateLocked(IBlip blip)
        {
            var mValue = MValue.Nil;

            lock (blip)
            {
                if (!blip.Exists)
                {
                    return(MValue.Nil);
                }

                AltNative.MValueCreate.MValue_CreateBlip(blip.NativePointer, ref mValue);
                return(mValue);
            }
        }
예제 #11
0
 public static Task SetRouteAsync(this IBlip blip, bool route) =>
 AltVAsync.Schedule(() => blip.Route = route);
예제 #12
0
 public static Task SetSpriteAsync(this IBlip blip, ushort sprite) =>
 AltVAsync.Schedule(() => blip.Sprite = sprite);
예제 #13
0
 public static Task SetColorAsync(this IBlip blip, byte color) =>
 AltVAsync.Schedule(() => blip.Color = color);
예제 #14
0
 public static Task <IEntity> AttachedToAsync(this IBlip blip) =>
 AltVAsync.Schedule(() => blip.AttachedTo);
예제 #15
0
 public static Task <BlipType> GetBlipTypeAsync(this IBlip blip) =>
 AltVAsync.Schedule(() => (BlipType)blip.BlipType);
예제 #16
0
 public static Task <bool> IsGlobalAsync(this IBlip blip) =>
 AltVAsync.Schedule(() => blip.IsGlobal);
예제 #17
0
 public static Task <bool> IsAttachedAsync(this IBlip blip) =>
 AltVAsync.Schedule(() => blip.IsAttached);
예제 #18
0
 public BlipRef(IBlip blip)
 {
     this.blip = blip.AddRef() ? blip : null;
     Alt.Module.CountUpRefForCurrentThread(blip);
 }
예제 #19
0
 public static void RemoveBlip(IBlip blip) => blip.Remove();
예제 #20
0
 public void RemoveBlip(IBlip blip)
 {
     Alt.Module.OnRemoveBlip(blip.NativePointer);
 }
예제 #21
0
 public void RemoveBlip(IBlip blip)
 {
     Alt.Module.OnRemoveBlip(blip.NativePointer);
     MockEntities.Entities.Remove(blip.NativePointer);
 }
예제 #22
0
 public static Task SetRouteColorAsync(this IBlip blip, Rgba color) =>
 AltVAsync.Schedule(() => blip.RouteColor = color);
예제 #23
0
 public void CreateMValueBlip(out MValueConst mValue, IBlip value)
 {
     throw new NotImplementedException();
 }
예제 #24
0
 public override void OnRemove(IBlip entity)
 {
     MockEntities.FreeNoId(entity.NativePointer);
 }
예제 #25
0
 public static Task RemoveAsync(this IBlip blip) =>
 AltVAsync.Schedule(blip.RemoveAsync);
예제 #26
0
 public void CreateMValueBlip(out MValueConst mValue, IBlip value)
 {
     mValue = new MValueConst(MValueConst.Type.Entity,
                              AltNative.Server.Core_CreateMValueBlip(NativePointer, value.NativePointer));
 }
예제 #27
0
 public static void RemoveBlip(IBlip blip) =>
 Module.Server.RemoveBlip(blip);
 public static IBlip ToAsync(this IBlip blip, IAsyncContext asyncContext) =>
 asyncContext == null || asyncContext.CreateRef(blip) ? new AsyncBlip(blip, asyncContext) : null;
예제 #29
0
 public BlipRef(IBlip blip)
 {
     this.blip = blip.AddRef() ? blip : null;
 }
 public static IBlip ToAsync(this IBlip blip) => new AsyncBlip(blip, null);