123456789101112131415161718192021222324252627282930313233 |
- using System;
- using UnityEngine;
- public class AdjustObjHeightToMaidBone : MonoBehaviour
- {
- private void Awake()
- {
- this.m_myTransform = base.transform;
- }
- public void Adjust(int maidNo, string boneNameY)
- {
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(maidNo);
- if (maid == null)
- {
- Debug.LogError("AdjustObjHeightToMaidBone メイド番号:" + maidNo + "は居ません。");
- return;
- }
- Transform transform = CMT.SearchObjName(maid.body0.m_trBones, boneNameY, true);
- if (transform == null)
- {
- Debug.LogError("AdjustObjHeightToMaidBone ボーン名:" + boneNameY + "は見つかりません。");
- return;
- }
- this.m_myTransform.position = new Vector3(this.m_myTransform.position.x, transform.position.y, this.m_myTransform.position.z);
- }
- private void Update()
- {
- }
- private Transform m_myTransform;
- }
|