Skip to content

Commit 5fc58ee

Browse files
fix(plugin): remove inaccurate comment about closure in typewriter pattern
The code was already fixed to use static lambda with state parameter, so the comment suggesting it uses a closure was incorrect. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent b257a15 commit 5fc58ee

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • .claude-plugin/skills/game-patterns

.claude-plugin/skills/game-patterns/SKILL.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public sealed class TooltipTrigger : IDisposable
393393
}
394394
```
395395

396-
### Typewriter Effect (with StringBuilder Pool)
396+
### Typewriter Effect (Zero-GC)
397397
```csharp
398398
public sealed class TypewriterState
399399
{
@@ -411,8 +411,6 @@ public sealed class TypewriterState
411411
}
412412
}
413413

414-
// Note: This pattern uses a closure for simplicity. For high-frequency usage,
415-
// consider wrapping StringBuilder in the state class to achieve full zero-GC.
416414
public static async UniTask TypeText(string content, float charDelay, Action<string> onUpdate)
417415
{
418416
var state = JObjectPool.Shared<TypewriterState>().Rent();

0 commit comments

Comments
 (0)