切换主武器
This commit is contained in:
48
Assets/Scripts/MainGame/Items/Data/ViewObjectData.cs
Normal file
48
Assets/Scripts/MainGame/Items/Data/ViewObjectData.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Cielonos.MainGame.Inventory
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ViewObjectData", menuName = "Cielonos/Items/ViewObjectData")]
|
||||
public partial class ViewObjectData : SerializedScriptableObject
|
||||
{
|
||||
[ListDrawerSettings(ShowFoldout = true)]
|
||||
public List<ViewObjectDataUnit> viewObjectUnits = new List<ViewObjectDataUnit>();
|
||||
}
|
||||
|
||||
public partial class ViewObjectData
|
||||
{
|
||||
public enum AttachBodyPartType
|
||||
{
|
||||
RightHand,
|
||||
LeftHand,
|
||||
Head,
|
||||
FlexibleCenterPoint,
|
||||
Back,
|
||||
Hips,
|
||||
RightFoot,
|
||||
LeftFoot,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ViewObjectDataUnit
|
||||
{
|
||||
public string objectName;
|
||||
public GameObject objectPrefab;
|
||||
public bool isCustomAttachPoint;
|
||||
[HideIf("isCustomAttachPoint")]
|
||||
public AttachBodyPartType normalAttachBodyPart;
|
||||
[ShowIf("isCustomAttachPoint")]
|
||||
public string customAttachPartName;
|
||||
|
||||
public bool applyOffset;
|
||||
[ShowIf("applyOffset")]
|
||||
public Vector3 positionOffset;
|
||||
[ShowIf("applyOffset")]
|
||||
public Vector3 rotationOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user