public override void OnDeath() { Debug.DrawText("Drill destroyed!", 3, Color.Red, 5); StopAnimation(blendOutTime: 1); m_destroyedEffect = ParticleEffect.Get("smoke_and_fire.Vehicle_fires.large2"); m_destroyedEffect.Spawn(Position); }
internal static ParticleEffect TryGet(IntPtr handle) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (handle == IntPtr.Zero) { throw new NullPointerException(); } #endif var particleEffect = particleEffects.FirstOrDefault(x => x.Handle == handle); if (particleEffect == null) { particleEffect = new ParticleEffect(handle); particleEffects.Add(particleEffect); } return(particleEffect); }
public ParticleEmitter LoadParticleEmitter(ParticleEffect particleEffect, ref ParticleSpawnParameters spawnParams, int slot = -1) { return ParticleEmitter.TryGet(NativeEntityMethods.LoadParticleEmitter(this.GetIEntity(), slot, particleEffect.Handle, ref spawnParams)); }
public void SwitchToParticleEffectObject(ParticleEffect effect, Vec3 offset, Vec3 dir, float scale) { NativeEntityMethods.BindAttachmentToParticleEffect(Handle, effect.Handle, offset, dir, scale); }
internal static ParticleEffect TryGet(IntPtr handle) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (handle == IntPtr.Zero) throw new NullPointerException(); #endif var particleEffect = particleEffects.FirstOrDefault(x => x.Handle == handle); if (particleEffect == null) { particleEffect = new ParticleEffect(handle); particleEffects.Add(particleEffect); } return particleEffect; }
public ParticleEmitter LoadParticleEmitter(ParticleEffect particleEffect, ref ParticleSpawnParameters spawnParams, int slot = -1) { return(ParticleEmitter.TryGet(NativeEntityMethods.LoadParticleEmitter(this.GetIEntity(), slot, particleEffect.Handle, ref spawnParams))); }
public ParticleEmitter LoadParticleEmitter(ParticleEffect particleEffect, ref ParticleSpawnParameters spawnParams, int slot = -1) { var ptr = NativeEntityMethods.LoadParticleEmitter(this.GetIEntity(), slot, particleEffect.Handle, ref spawnParams); if (ptr != IntPtr.Zero) return new ParticleEmitter(ptr); return null; }