切换主武器
This commit is contained in:
16
Assets/Scripts/MainGame/Items/Data/ContentData.cs
Normal file
16
Assets/Scripts/MainGame/Items/Data/ContentData.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ContentData : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/MainGame/Items/Data/ContentData.cs.meta
Normal file
2
Assets/Scripts/MainGame/Items/Data/ContentData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd6893a98c17a0e47af8bd555a67190b
|
||||
@@ -8,11 +8,11 @@ using UnityEngine;
|
||||
namespace Cielonos.MainGame.Inventory
|
||||
{
|
||||
[CreateAssetMenu(fileName = "FunctionData", menuName = "Cielonos/Items/FunctionData")]
|
||||
public class FunctionData : SerializedScriptableObject
|
||||
public partial class FunctionData : SerializedScriptableObject
|
||||
{
|
||||
[DictionaryDrawerSettings(KeyLabel = "Attack Unit", DisplayMode = DictionaryDisplayOptions.ExpandedFoldout)]
|
||||
[Searchable]
|
||||
public Dictionary<string, ItemFunctionUnit> functionUnits;
|
||||
public Dictionary<string, FunctionUnit> functionUnits = new Dictionary<string, FunctionUnit>();
|
||||
|
||||
[OnInspectorGUI("UpdateUnits")]
|
||||
public void UpdateUnits()
|
||||
@@ -23,9 +23,8 @@ namespace Cielonos.MainGame.Inventory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ItemFunctionUnit
|
||||
|
||||
public partial class FunctionData
|
||||
{
|
||||
public enum IntervalReductionType
|
||||
{
|
||||
@@ -34,26 +33,30 @@ namespace Cielonos.MainGame.Inventory
|
||||
AttackSpeed = 10
|
||||
}
|
||||
|
||||
[ReadOnly]
|
||||
public FunctionData parentData;
|
||||
[Serializable]
|
||||
public class FunctionUnit
|
||||
{
|
||||
[ReadOnly]
|
||||
public FunctionData parentData;
|
||||
|
||||
[TitleGroup("Information")]
|
||||
public bool shownInUI;
|
||||
[TitleGroup("Information")]
|
||||
public Sprite icon;
|
||||
[TitleGroup("Information")]
|
||||
public List<string> operation;
|
||||
[TitleGroup("Information")]
|
||||
public bool shownInUI;
|
||||
[TitleGroup("Information")]
|
||||
public Sprite icon;
|
||||
[TitleGroup("Information")]
|
||||
public List<string> operation;
|
||||
|
||||
[TitleGroup("Costs")]
|
||||
public float energyCost;
|
||||
[TitleGroup("Costs")]
|
||||
public int ammoCost;
|
||||
[TitleGroup("Costs")]
|
||||
public float energyCost;
|
||||
[TitleGroup("Costs")]
|
||||
public int ammoCost;
|
||||
|
||||
[TitleGroup("Interval")]
|
||||
public float interval;
|
||||
[TitleGroup("Interval")]
|
||||
public float intervalLowerLimit;
|
||||
[TitleGroup("Interval")]
|
||||
public IntervalReductionType intervalReductionType;
|
||||
[TitleGroup("Interval")]
|
||||
public float interval;
|
||||
[TitleGroup("Interval")]
|
||||
public float intervalLowerLimit;
|
||||
[TitleGroup("Interval")]
|
||||
public IntervalReductionType intervalReductionType;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bfbd542596c9aa4887562352b6768c7
|
||||
Reference in New Issue
Block a user