예제 #1
0
    //生成特效
    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);
    }
예제 #2
0
 public void PutBackEffect(GameObject Effect)
 {
     GamePoolMgr.Despawn(Effect.transform);
 }