您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
37 行
592 B
37 行
592 B
using UnityEngine;
|
|
using UOP1.Pool;
|
|
using UOP1.Factory;
|
|
|
|
[CreateAssetMenu(fileName = "NewParticlePool", menuName = "Pool/Particle Pool")]
|
|
public class ParticlePoolSO : ComponentPoolSO<PoolableParticle>
|
|
{
|
|
[SerializeField]
|
|
private ParticleFactorySO _factory;
|
|
[SerializeField]
|
|
private int _initialPoolSize;
|
|
|
|
public override IFactory<PoolableParticle> Factory
|
|
{
|
|
get
|
|
{
|
|
return _factory;
|
|
}
|
|
set
|
|
{
|
|
_factory = value as ParticleFactorySO;
|
|
}
|
|
}
|
|
|
|
public override int InitialPoolSize
|
|
{
|
|
get
|
|
{
|
|
return _initialPoolSize;
|
|
}
|
|
set
|
|
{
|
|
_initialPoolSize = value;
|
|
}
|
|
}
|
|
}
|
|
|