Class EffectSystem
IEffectSystem 구현체. ObjectPool<EffectView> 기반 이펙트 재사용.
public class EffectSystem : IEffectSystem
- Inheritance
-
objectEffectSystem
- Implements
Remarks
이펙트 키별 Pool은 Scope 구성 시 RegisterPool로 등록해야 한다. Play 시 활성 목록(_active)에 추가하고, 완료/ForceStop 시 자동 제거. Dispose(씬 언로드)시 StopAll로 활성 이펙트 전체 정리.
Constructors
EffectSystem(ILogSystem)
public EffectSystem(ILogSystem log)
Parameters
logILogSystem
Methods
Dispose()
public void Dispose()
Play(string, Vector3, Quaternion)
지정 위치에 이펙트 재생. Pool에서 EffectView를 꺼내 활성화.
public void Play(string key, Vector3 position, Quaternion rotation = default)
Parameters
keystring이펙트 키 (EffectKeys 상수 사용).
positionVector3재생 월드 위치.
rotationQuaternion재생 회전. 기본값은 Quaternion.identity.
RegisterPool(string, IObjectPool<EffectView>)
이펙트 키별 Pool 등록. Scope의 RegisterBuildCallback에서 호출.
public void RegisterPool(string key, IObjectPool<EffectView> pool)
Parameters
keystring이펙트 식별 키.
poolIObjectPool<EffectView>해당 키의 ObjectPool.
Stop(string)
해당 키의 활성 이펙트 중단.
public void Stop(string key)
Parameters
keystring중단할 이펙트 키.
StopAll()
모든 활성 이펙트 강제 중단 및 Pool 반환.
public void StopAll()