Ejemplo n.º 1
0
 /// <summary>
 /// 删除实体
 /// </summary>
 /// <param name="prefab">实体对象</param>
 /// <returns>void</returns>
 internal void DestroyInstance(GameObject instance)
 {
     if (destroyDelegates != null)
     {
         destroyDelegates(instance);
     }
     else
     {
         InstanceHandler.DestroyInstance(instance);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 实例化预制体
 /// </summary>
 /// <param name="prefab">预制体</param>
 /// <param name="pos">坐标</param>
 /// <param name="rot">旋转</param>
 /// <returns>实例对象</returns>
 internal GameObject InstantiatePrefab(GameObject prefab, Vector3 pos, Quaternion rot)
 {
     if (instantiateDelegates != null)
     {
         return(instantiateDelegates(prefab, pos, rot));
     }
     else
     {
         return(InstanceHandler.InstantiatePrefab(prefab, pos, rot));
     }
 }