//生成特效 public GameObject GenEffect(string InName) { //检查是否有注册过 GameObject SampleEffect = LoadEffect.LoadEffectObj(InName); if (SampleEffect == null) { return(null); } if (!GamePoolMgr.IsSpawned(SampleEffect.transform)) { GamePoolMgr.Regist(InName, SampleEffect.transform); } Transform Target = GamePoolMgr.Spawn(InName); return(Target.gameObject); }
public void PutBackEffect(GameObject Effect) { GamePoolMgr.Despawn(Effect.transform); }