using System; using UnityEngine; public abstract class JointBase : MonoBehaviour { public void Awake() { this.CreateDebugSelectMark(); this.main_camera = GameMain.Instance.MainCamera.camera; } private void CreateDebugSelectMark() { if (base.transform.Find("SelectMark") != null) { return; } GameObject gameObject = new GameObject("SelectMark"); gameObject.transform.SetParent(base.transform, false); gameObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); Vector3[] array = new Vector3[] { new Vector3(3f, 0.1f, 0.1f), new Vector3(0.1f, 3f, 0.1f), new Vector3(0.1f, 0.1f, 3f) }; for (int i = 0; i < array.Length; i++) { GameObject gameObject2 = GameObject.CreatePrimitive(PrimitiveType.Cube); gameObject2.name = "child_" + i.ToString(); gameObject2.transform.SetParent(gameObject.transform, false); gameObject2.transform.localScale = array[i]; } } public abstract void AddIkComponent(Maid target_maid); public Camera main_camera { get; private set; } }