2025-11-25 08:19:33 -05:00
|
|
|
using System.Collections.Generic;
|
2026-05-23 08:27:50 -04:00
|
|
|
using Cielonos.MainGame.Inventory;
|
2025-11-25 08:19:33 -05:00
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
|
using UnityEngine;
|
2025-12-17 04:19:38 -05:00
|
|
|
using UnityEngine.Serialization;
|
2025-11-25 08:19:33 -05:00
|
|
|
|
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
|
|
|
{
|
2025-12-23 19:47:06 -05:00
|
|
|
public partial class BodyPartsSubcontroller : SubcontrollerBase<CharacterBase>
|
2025-11-25 08:19:33 -05:00
|
|
|
{
|
2025-12-23 19:47:06 -05:00
|
|
|
[Title("Main Parts")]
|
2025-12-17 04:19:38 -05:00
|
|
|
public Transform flexibleCenterPoint;
|
|
|
|
|
public Transform staticCenterPoint;
|
2025-12-23 19:47:06 -05:00
|
|
|
public Transform cameraLockingPoint;
|
2025-11-25 08:19:33 -05:00
|
|
|
public Transform footPoint;
|
2026-03-20 12:07:44 -04:00
|
|
|
public Transform infoUIPoint;
|
2025-11-25 08:19:33 -05:00
|
|
|
public Transform head;
|
|
|
|
|
public Transform leftHand;
|
|
|
|
|
public Transform rightHand;
|
2025-12-23 19:47:06 -05:00
|
|
|
public Transform back;
|
|
|
|
|
public Transform hips;
|
2025-11-25 08:19:33 -05:00
|
|
|
public Transform leftFoot;
|
|
|
|
|
public Transform rightFoot;
|
|
|
|
|
|
|
|
|
|
[Title("Custom Parts")]
|
|
|
|
|
public Dictionary<string, Transform> customBodyParts;
|
2026-01-03 18:19:39 -05:00
|
|
|
|
|
|
|
|
[Title("Attachments")]
|
|
|
|
|
public Dictionary<string, GameObject> attachments;
|
2025-11-25 08:19:33 -05:00
|
|
|
}
|
2025-12-23 19:47:06 -05:00
|
|
|
|
|
|
|
|
public partial class BodyPartsSubcontroller
|
|
|
|
|
{
|
|
|
|
|
public Transform GetPart(ViewObjectData.AttachBodyPartType partType)
|
|
|
|
|
{
|
|
|
|
|
return partType switch
|
|
|
|
|
{
|
|
|
|
|
ViewObjectData.AttachBodyPartType.RightHand => rightHand,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.LeftHand => leftHand,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.Head => head,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.FlexibleCenterPoint => flexibleCenterPoint,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.Back => back,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.Hips => hips,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.RightFoot => rightFoot,
|
|
|
|
|
ViewObjectData.AttachBodyPartType.LeftFoot => leftFoot,
|
|
|
|
|
_ => null
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Transform GetPart(string partName)
|
|
|
|
|
{
|
|
|
|
|
return customBodyParts.GetValueOrDefault(partName);
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-03 18:19:39 -05:00
|
|
|
|
|
|
|
|
public partial class BodyPartsSubcontroller
|
|
|
|
|
{
|
|
|
|
|
public AuxiliaryDrone AuxiliaryDrone => GetAttachment("AuxiliaryDrone")?.GetComponent<AuxiliaryDrone>();
|
|
|
|
|
|
|
|
|
|
public GameObject GetAttachment(string attachmentName)
|
|
|
|
|
{
|
|
|
|
|
return attachments.GetValueOrDefault(attachmentName);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-11-25 08:19:33 -05:00
|
|
|
}
|