public virtual void Show(bool isshow) { if (null != gameObject) { U3DMod.SetActive(gameObject, isshow); } }
public void Despawn(U3DObject uobj) { if (spwanList.Contains(uobj)) { U3DMod.AddChild(null, uobj.gameObject, true); uobj.Hide(); spwanList.Remove(uobj); despawnList.Add(uobj); } }
public virtual void Destroy() { if (DestroyHandler != null) { DestroyHandler(this); } if (gameObject != null) { U3DMod.Destroy(gameObject); } }
public virtual bool isShow() { if (gameObject != null) { return(U3DMod.isActive(gameObject)); } else { return(false); } }
public U3DObject SpawnOne() { U3DObject uobj = null; if (despawnList.Count > 0) { spwanList.Add(despawnList[0]); uobj = despawnList[0]; despawnList.Remove(uobj); uobj.DespawnHandler = Despawn; uobj.OnDestroyHandler = OnDestroy; } else if (spwanList.Count > 0) { uobj = U3DMod.Clone <U3DObject>(spwanList[0]); spwanList.Add(uobj); uobj.DespawnHandler = Despawn; uobj.OnDestroyHandler = OnDestroy; } return(uobj); }
public virtual void DestroyThisComponent() { U3DMod.Destroy(this); }