Skip to content

Commit

Permalink
Allow custom particles on decay platform
Browse files Browse the repository at this point in the history
  • Loading branch information
bakscratch committed Jun 8, 2022
1 parent 4387e21 commit b0e01dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/hammer/Gameplay/PlatformerDecay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public partial class PlatformerDecay : ModelEntity
[Net]
public bool Broken { get; set; }

[Net]
[Property( "effect_name" ), EntityReportSource, FGDType( "particlesystem" )]
public string EffectParticle { get; set; } = "particles/break/break.cardboard.vpcf";

private Color DefaultColor;
public override void Spawn()
{
Expand Down Expand Up @@ -79,7 +83,7 @@ private void Break()
EnableAllCollisions = false;

Sound.FromEntity( "physics.glass.shard.impact", this ).SetVolume( 2f );
Particles.Create( "particles/break/break.cardboard.vpcf", Position );
Particles.Create( EffectParticle, Position );

UnbreakAfter( RespawnTime );
}
Expand Down

0 comments on commit b0e01dc

Please sign in to comment.