This commit is contained in:
JA
2026-06-20 19:34:23 +08:00
parent e5031c0068
commit d442805c3f
4136 changed files with 514641 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObjectPoll : PollBase
{
public override Object Spwan(string name)
{
Object obj = base.Spwan(name);//´Ó¸¸ÀàÖÐÈ¡³ö
if (obj == null)
return null;
GameObject go = obj as GameObject;
go.SetActive(true);
return obj;
}
public override void UnSpwan(string name, Object obj)
{
GameObject go = obj as GameObject;
go.SetActive(false);
go.transform.SetParent(this.transform, false);
base.UnSpwan(name, obj);
}
public override void Release()
{
base.Release();
foreach (PollObject items in m_Objects)
{
if (System.DateTime.Now.Ticks - items.lastUserTime.Ticks >= m_ReleaseTime * 10000000)
{
Debug.Log("GameObjectPoll Release item:" + System.DateTime.Now);
Destroy(items.Object);
m_Objects.Remove(items);
Release();
return;
}
}
}
}