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.
29 lines
1.0 KiB
29 lines
1.0 KiB
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
public class PowerReplay : ReplaySimpleObject |
|
{ |
|
/// <summary> |
|
/// 设置特殊属性 |
|
/// </summary> |
|
/// <param name="obj"></param> |
|
public override void SetCloneGameObject(GameObject obj, string json) |
|
{ |
|
obj.AddComponent<ObjSelectCtrl>(); |
|
//obj.AddComponent<ObjDrag>(); |
|
obj.AddComponent<ObjDelete>(); |
|
obj.AddComponent<ObjRotate>(); |
|
var jsonData = JsonUtility.FromJson<PowerRecordObjectBase>(json); |
|
var PowerAttribute = obj.GetComponent<PowerAttribute>(); |
|
PowerAttribute.Task = jsonData.Task; |
|
PowerAttribute.Affiliation = jsonData.Affiliation; |
|
PowerAttribute.Number = jsonData.Number; |
|
PowerAttribute.TypeName = jsonData.TypeName; |
|
var RecordDiverseDatas = GetComponents<IReplayDiverseData>(); |
|
foreach (IReplayDiverseData item in RecordDiverseDatas) |
|
{ |
|
item.ReplayDiverseData(jsonData.SpecialData, obj); |
|
} |
|
} |
|
} |