using System.Collections.Generic; using UnityEngine; #if ! RENDER_SERVER #endif namespace Framework { public class Skeleton { private Dictionary _bones; public Skeleton(Transform[] transforms) { if (transforms != null) { _bones = new Dictionary(transforms.Length); foreach (var t in transforms) { if (_bones.ContainsKey(t.name)) { DebugUtil.LogError("Skeleton Add Bone, a bone has already been collected with same name : {0}", t.name); continue; } _bones.Add(t.name, t); } } } public Transform GetBone(string name) { Transform bone = null; if (_bones != null && _bones.TryGetValue(name, out bone)) { } return bone; } } }