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.
24 lines
907 B
24 lines
907 B
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
public class ReplaySixLadder : ReplaySimpleObject |
|
{ |
|
/// <summary> |
|
/// 回放克隆 |
|
/// </summary> |
|
/// <param name="json"></param> |
|
public override void CloneObject(string json) |
|
{ |
|
var jsonData = JsonUtility.FromJson<RecordSixLadder>(json); |
|
var clonedObj = EntitiesManager.Instance.CreateObj(cloneBase.clonePrefab, jsonData.myTransform.getMyPosition(), transform, long.Parse(jsonData.objectName)); |
|
clonedObj.name = jsonData.objectName;//名字即ID |
|
SetBaseGameObject(clonedObj, jsonData); |
|
clonedObj.transform.Find("LadderUp").localPosition = jsonData.upLadderPos; |
|
SetCloneGameObject(clonedObj, json); |
|
if (clonedObj.GetComponent<ObjSelectCtrl>()) |
|
{ |
|
clonedObj.GetComponent<ObjSelectCtrl>().SetSelect(json); |
|
} |
|
} |
|
}
|
|
|