Skip to content

Commit

Permalink
[Blacnk] Document Effects
Browse files Browse the repository at this point in the history
  • Loading branch information
CartBlanche committed Jan 9, 2025
1 parent f5988d1 commit 2130438
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ public Particle(Vector2 position, Vector2 direction, float speed, float lifeTime
TailLength = tailLength;
}

/// <summary>
/// Updates the state of the particle based on elapsed game time.
/// </summary>
/// <param name="gameTime">
/// The <see cref="GameTime"/> object representing the elapsed time since the last update.
/// </param>
/// <remarks>
/// This method updates the particle's position, velocity, lifespan, and color,
/// and invokes the <see cref="OnDeath"/> event if the particle is no longer alive.
/// </remarks>
public void Update(GameTime gameTime)
{
// Get elapsed time in seconds
Expand Down Expand Up @@ -121,6 +131,8 @@ public void Update(GameTime gameTime)

if (!IsAlive)
{
// Allows you to react to the death of a particle.
// Potentially allows you to chain particles together.
OnDeath?.Invoke(Position);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
namespace ___SafeGameName___.Core.Effects;

/// <summary>
/// Enum describes the type of particle effects we support.
/// Represents the types of particle effects supported in the game.
/// </summary>
/// <remarks>
/// This enum is used to identify and manage various particle effect styles
/// within the game. Each effect type corresponds to a specific visual behavior
/// and animation style, allowing developers to easily create or trigger the desired
/// particle effect.
/// </remarks>
public enum ParticleEffectType
{
/// <summary>
/// A celebratory confetti effect, often used for events such as achievements or victories.
/// </summary>
Confetti,

/// <summary>
/// A dynamic explosion effect, typically used for destruction events or action sequences.
/// </summary>
Explosions,

/// <summary>
/// A colorful fireworks effect, often used for celebrations or festive displays.
/// </summary>
Fireworks,

/// <summary>
/// A shimmering sparkle effect, useful for magical or whimsical moments.
/// </summary>
Sparkles,
}

0 comments on commit 2130438

Please sign in to comment.