Bro Code logoBRO CODE CRINDEPENDENT GAME DEV TOOLS
← All abilities
ABILITY 08

TimeBubble

Create a temporal bubble that slows enemies and projectiles inside its area.

Activation

TimeBubbleButton

Example use

Slow incoming projectiles within the bubble.

Ability documentation
CHARACTER ABILITY
SETUP GUIDE

Set up this ability

Component
CharacterTimeBubble
Source
Scripts/Abilities/CharacterTimeBubble.cs
Animator bools
TimeBubble

Component dependencies

Requirements for this ability and its targets
ComponentWhere to add or assign itPurpose / setup
CharacterHorizontalMovementEnemy GameObjectRequired for slowing an enemy through its MovementSpeed field.
Collider2D + ProjectileProjectile collider; Projectile on it or a parentRequired for detecting and slowing a projectile.

Visual component dependencies

These components support the associated effect. A missing optional visual does not by itself imply that the gameplay mechanic cannot run.

Visual dependencies
ComponentWhere to add or assign itPurpose / setup
RadiusVisual + SpriteRendererBubbleVisualPrefab rootRequired for the bubble visual to scale to BubbleRadius and follow the character. Assign BubbleVisual. Script: Assets/CorgiAddOns/Scripts/Abilities/RadiusVisual.cs.
  1. Add CharacterTimeBubble and set a positive ActiveTime, such as 3, before entering Play Mode. Keep it at or below MaxActiveTime.
  2. Set EnemyLayerMask and ProjectileLayerMask. Named defaults attempt to resolve Enemies and Projectiles when the component is added or reset.
  3. Enemies need CharacterHorizontalMovement for the slowdown; projectiles need Projectile.
  4. Optionally assign BubbleVisual, whose root should have RadiusVisual.
  5. Use SlowFactor = 0.3 for 30% of original MovementSpeed or Projectile.Speed. Press TimeBubbleButton and test entry, exit and stop restoration.

Inspector reference

These are C# field declaration defaults. Existing prefab and scene values can override them. Shared fields are documented under Ability Configuration.

CharacterTimeBubble fields
FieldTypeDeclared default
SlowFactorfloat0.3f
BubbleRadiusfloat5f
EnemyLayerMaskLayerMaskNot assigned in declaration
ProjectileLayerMaskLayerMaskNot assigned in declaration
ScanIntervalfloat0.1f
MaxActiveTimefloat5f
BubbleVisualPrefabGameObjectNot assigned in declaration

Usage notes

  • This changes specific movement/projectile speed fields; it is not a global time-scale effect.
  • StartAbility is overridden and applies the bubble immediately, bypassing the base ActivationDelay path.