# Class EffectSingleCase

动画特效对象池管理器，加载动画后自动播放，播放完后自动回收到池中 1、支持Spine动画 2、支持Cocos Animation动画 3、支持Cocos ParticleSystem粒子动画

#### Hierarchy

- EffectSingleCase

- Defined in assets/libs/animator-effect/EffectSingleCase.ts:33

#####
Index

### Constructors

constructor

### Properties

_speed
effects
effects_use
res
_instance

### Accessors

speed
instance

### Methods

clear
loadAndShow
onHandler
put
release
setSpeed
show

## Constructors

### constructor

- new EffectSingleCase(): EffectSingleCase

- #### Returns EffectSingleCase

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:61

## Properties

### `Private` _speed

_speed: number = 1

- Defined in assets/libs/animator-effect/EffectSingleCase.ts:42

### `Private` effects

effects: Map<string, NodePool> = ...

对象池集合

- Defined in assets/libs/animator-effect/EffectSingleCase.ts:55

### `Private` effects_use

effects_use: Map<Node, boolean> = ...

正在使用中的显示对象集合

- Defined in assets/libs/animator-effect/EffectSingleCase.ts:57

### `Private` res

res: Map<string, boolean> = ...

对象池中用到的资源 - 这里只管理本对象加载的资源，预加载资源由其它对象自己施放

- Defined in assets/libs/animator-effect/EffectSingleCase.ts:59

### `Static` `Private` _instance

_instance: EffectSingleCase

- Defined in assets/libs/animator-effect/EffectSingleCase.ts:34

## Accessors

### speed

- get speed(): number

- 全局动画播放速度

  #### Returns number

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:44
- set speed(value: number): void

- #### Parameters

  - ##### value: number

  #### Returns void

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:47

### `Static` instance

- get instance(): EffectSingleCase

- #### Returns EffectSingleCase

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:35

## Methods

### clear

- clear(path?: string): void

- 清除对象池数据

  #### Parameters

  - ##### `Optional` path: string

    参数为空时，清除所有对象池数据;指定名时，清楚指定数据

  #### Returns void

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:165

### loadAndShow

- loadAndShow(path: string, parent?: Node, params?: IEffectParams): Promise<Node>

- 加载资源并现实特效

  #### Parameters

  - ##### path: string

    预制资源路径

  - ##### `Optional` parent: Node

    父节点

  - ##### `Optional` params: IEffectParams

  #### Returns Promise<Node>

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:77

### `Private` onHandler

- onHandler(event: string, args: any): void

- #### Parameters

  - ##### event: string

  - ##### args: any

  #### Returns void

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:65

### put

- put(node: Node): void

- 回收对象

  #### Parameters

  - ##### node: Node

    节点

  #### Returns void

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:149

### release

- release(path?: string): void

- 施放对象池中显示对象的资源内存

  #### Parameters

  - ##### `Optional` path: string

    资源路径

  #### Returns void

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:182

### `Private` setSpeed

- setSpeed(node: Node): void

- 设置动画速度

  #### Parameters

  - ##### node: Node

  #### Returns void

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:196

### show

- show(path: string, parent?: Node, params?: IEffectParams): Node

- 显示预制对象

  #### Parameters

  - ##### path: string

    预制资源路径

  - ##### `Optional` parent: Node

    父节点

  - ##### `Optional` params: IEffectParams

  #### Returns Node

  - Defined in assets/libs/animator-effect/EffectSingleCase.ts:107

Generated using TypeDoc