t1k:cocos:playable:animation-core
| Field | Value |
|---|---|
| Module | playable |
| Version | 0.5.6 |
| Effort | high |
| Tools | — |
Keywords: ads, animation, cocos, flying, object pool, playable, tween
How to invoke
Section titled “How to invoke”/t1k:cocos:playable:animation-coreFlyingAnimation & FlyingAnimationController
Section titled “FlyingAnimation & FlyingAnimationController”Pooled particle-like animation system built on Cocos tween(). FlyingAnimation is the per-node Component; FlyingAnimationController is the scene singleton that manages spawning and pooling. See also: t1k-cocos-playable-signalbus.
Import paths:
db://assets/PLAGameFoundation/animations/FlyingAnimationdb://assets/PLAGameFoundation/animations/FlyingAnimationController
Details
Section titled “Details”- API reference: animation types, config interface, controller API, tween patterns
- Usage examples: collect effect, explosion, float-up text
Common Mistakes
Section titled “Common Mistakes”- Not calling
Tween.stopAllByTarget(node)before replaying on a pooled node — old tweens persist after recycle. - Setting
autoDestroy = truewhen using the controller — controller handles pooling;autoDestroymust stayfalse. - Passing
targetNodefor a non-target animation type — ignored silently; check enum group. - Forgetting
UIOpacitycomponent on prefab —FlyingAnimation.onLoadauto-adds it, but only after the node is active in the scene.
Gotchas
Section titled “Gotchas”- Animation clip references hold scene assets — they don’t unload until the component is destroyed — disable doesn’t free.
- Skeletal animation events fire on the animation thread; UI mutation must marshal to main.