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();
}
///
/// 添加初始状态记录
///
///
public override void AddRecordFrame(List 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;
}