public EnviromentItem CreateCopy()
        {
            var item = new EnviromentItem();

            item.prefab = prefab;
            item.Name   = Name;
            return(item);
        }
Exemple #2
0
 private void SetEnviroment(EnviromentItem obj, Coordinate coordinates, bool active)
 {
     if (log)
     {
         Debug.Log("SetEnviroment:" + obj.prefab + " -> " + active);
     }
     if (obj.Created || active)//如果没有创建并且当前不需要显示,略过
     {
         if (obj.Body != null)
         {
             obj.Body.transform.SetParent(Context.transform);
             TransUtil.LoadCoordinatesInfo(coordinates, obj.Body.transform);
             obj.Body.SetActive(active);
         }
     }
 }