TryGet() static private method

static private TryGet ( IntPtr handle ) : ParticleEmitter
handle System.IntPtr
return ParticleEmitter
Beispiel #1
0
 public ParticleEmitter LoadParticleEmitter(ParticleEffect particleEffect, ref ParticleSpawnParameters spawnParams, int slot = -1)
 {
     return(ParticleEmitter.TryGet(NativeEntityMethods.LoadParticleEmitter(this.GetIEntity(), slot, particleEffect.Handle, ref spawnParams)));
 }
Beispiel #2
0
 /// <summary>
 /// Spawns this effect
 /// </summary>
 /// <param name="independent"></param>
 /// <param name="pos">World location to place emitter at.</param>
 /// <param name="dir">World rotation of emitter, set to Vec3.Up if null.</param>
 /// <param name="scale">Scale of the emitter.</param>
 public ParticleEmitter Spawn(Vec3 pos, Vec3?dir = null, float scale = 1f, bool independent = true)
 {
     return(ParticleEmitter.TryGet(NativeParticleEffectMethods.Spawn(Handle, independent, pos, dir ?? Vec3.Up, scale)));
 }
Beispiel #3
0
 /// <summary>
 /// Spawns this effect
 /// </summary>
 /// <param name="independent"></param>
 /// <param name="pos">World location to place emitter at.</param>
 /// <param name="dir">World rotation of emitter, set to Vec3.Up if null.</param>
 /// <param name="scale">Scale of the emitter.</param>
 public ParticleEmitter Spawn(Vector3 pos, Vector3?dir = null, float scale = 1f, bool independent = true)
 {
     return(ParticleEmitter.TryGet(ParticleEffectInterop.Spawn(Handle, independent, pos, dir ?? Vector3.Up, scale)));
 }