private List <ActorModel> CollectMapDefaultActors(GameObject mapGo) { defaultActorUid = -100; if (mapGo == null) { Debug.LogError("地图导出失败,没有地图预制体" + name); return(null); } List <ActorModel> actors = new List <ActorModel>(); Transform actorRoot = mapGo.transform.Find("DefaultActor"); if (actorRoot != null) { for (int i = 0; i < actorRoot.childCount; i++) { Transform actor = actorRoot.GetChild(i).transform; ActorCnf actorModel = ED_MapCom.GetActorCnf(actor.name); if (actorModel != null) { ActorModel actorData = new ActorModel(); actorData.uid = defaultActorUid--; actorData.id = actorModel.id; actorData.pos = ED_ActorCom.HandlePos(transform.position); actorData.roate = ED_ActorCom.HandlePos(transform.localEulerAngles); actorData.scale = ED_ActorCom.HandlePos(transform.localScale); actorData.isActive = gameObject.activeSelf; actors.Add(actorData); } } } return(actors); }
public override object ExportData() { ActorPointModel pointData = new ActorPointModel(); pointData.runAnimName = runAnimName; pointData.waitTime = waitTime; pointData.waitAnimName = waitAnimName; pointData.waitExParam = waitExParam; pointData.point = ED_ActorCom.HandlePos(transform.position); return(pointData); }