大连中石油电子沙盘
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
1.1 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CloneFifteenLadder : CloneSingleObj {
public override void Awake()
{
ResourcesName = "Prefab/Tool/FifteenLadder";
cloneObjType = CloneObjType.FifteenLadder;
base.Awake();
}
/// <summary>
/// 添加初始状态记录
/// </summary>
/// <param name="list"></param>
public override void AddRecordFrame(List<ObjectData> list)
{
foreach (Transform child in transform)
{
var data = new RecordFifteenLadder();
SetBaseData(data, child);
data.upLadderFstPos = child.Find("LadderUp1").localPosition;
data.upLadderScdPos = child.Find("LadderUp2").localPosition;
string json = JsonUtility.ToJson(data);
var objectJson = new ObjectData();
objectJson.cloneObjType = cloneObjType;
objectJson.json = json;
list.Add(objectJson);
}
}
}
public class RecordFifteenLadder : RecordObjectBase
{
public Vector3 upLadderFstPos;
public Vector3 upLadderScdPos;
}