ABILITY 08
TimeBubble
Create a temporal bubble that slows enemies and projectiles inside its area.
Activation
TimeBubbleButtonExample use
Slow incoming projectiles within the bubble.
Ability documentationCHARACTER ABILITY
SETUP GUIDE
Set up this ability
Component dependencies
| Component | Where to add or assign it | Purpose / setup |
|---|---|---|
| CharacterHorizontalMovement | Enemy GameObject | Required for slowing an enemy through its MovementSpeed field. |
| Collider2D + Projectile | Projectile collider; Projectile on it or a parent | Required 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.
| Component | Where to add or assign it | Purpose / setup |
|---|---|---|
| RadiusVisual + SpriteRenderer | BubbleVisualPrefab root | Required for the bubble visual to scale to BubbleRadius and follow the character. Assign BubbleVisual. Script: Assets/CorgiAddOns/Scripts/Abilities/RadiusVisual.cs. |
- Add CharacterTimeBubble and set a positive ActiveTime, such as 3, before entering Play Mode. Keep it at or below MaxActiveTime.
- Set EnemyLayerMask and ProjectileLayerMask. Named defaults attempt to resolve Enemies and Projectiles when the component is added or reset.
- Enemies need CharacterHorizontalMovement for the slowdown; projectiles need Projectile.
- Optionally assign BubbleVisual, whose root should have RadiusVisual.
- 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.
| Field | Type | Declared default |
|---|---|---|
SlowFactor | float | 0.3f |
BubbleRadius | float | 5f |
EnemyLayerMask | LayerMask | Not assigned in declaration |
ProjectileLayerMask | LayerMask | Not assigned in declaration |
ScanInterval | float | 0.1f |
MaxActiveTime | float | 5f |
BubbleVisualPrefab | GameObject | Not 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.
