导入leg插件,完成腿部动画
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "AD_FimpGeneratorsShared",
|
||||
"references": [
|
||||
"GUID:0e6b1f35d8416da46a5e09a445db4184",
|
||||
"GUID:4d3c0eb3c5c6f2243952516f8611fff4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67234053b6be56d4680434077ca8fd90
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27f0e1d4eab8b774aab707b9c84325fb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50c616e86f35f394c9ee592f2ff6c66d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee95a3fbc2c4f7246b3fa1eedbc078c1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace FIMSpace.Generating
|
||||
{
|
||||
[System.Serializable]
|
||||
public partial struct MinMax
|
||||
{
|
||||
public int Min;
|
||||
public int Max;
|
||||
|
||||
public bool IsZero { get { return Min == 0 && Max == 0; } }
|
||||
public static MinMax zero { get { return new MinMax(0,0); } }
|
||||
public Vector2 ToVector2 { get { return new Vector2(Min,Max); } }
|
||||
public Vector2Int ToVector2Int { get { return new Vector2Int(Min,Max); } }
|
||||
|
||||
public MinMax(int min, int max)
|
||||
{
|
||||
Min = min;
|
||||
Max = max;
|
||||
}
|
||||
|
||||
public int GetRandom()
|
||||
{
|
||||
return (int)(Min + (float)FGenerators.GetRandom() * ((Max + 1) - Min));
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
public static MinMax DrawGUI(MinMax target, GUIContent label, bool clamp = true)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
float width = EditorStyles.label.CalcSize(label).x;
|
||||
EditorGUIUtility.labelWidth = width + 4;
|
||||
EditorGUILayout.LabelField(label, GUILayout.Width(width));
|
||||
|
||||
GUILayout.Space(28);
|
||||
EditorGUIUtility.labelWidth = 28;
|
||||
target.Min = EditorGUILayout.IntField("Min", target.Min, GUILayout.Width(70));
|
||||
|
||||
//GUILayout.FlexibleSpace();
|
||||
GUILayout.Space(24);
|
||||
EditorGUIUtility.labelWidth = 32;
|
||||
target.Max = EditorGUILayout.IntField("Max", target.Max, GUILayout.Width(74));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUIUtility.labelWidth = 0;
|
||||
|
||||
if (clamp)
|
||||
{
|
||||
if (target.Min < 0) target.Min = 0;
|
||||
if (target.Max < 0) target.Max = 0;
|
||||
}
|
||||
|
||||
if (target.Min > target.Max) target.Max = target.Min;
|
||||
if (target.Max < target.Min) target.Min = target.Max;
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomPropertyDrawer(typeof(MinMax))]
|
||||
public class MinMaxDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
Rect srcPos = position;
|
||||
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
|
||||
EditorGUIUtility.labelWidth = 30;
|
||||
float labelW = EditorStyles.label.CalcSize(label).x;
|
||||
var vRect = new Rect(srcPos.width - 60 * 2f - 10, position.y, 60, position.height);
|
||||
|
||||
int preInd = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
SerializedProperty sp_min = property.FindPropertyRelative("Min");
|
||||
EditorGUI.PropertyField(vRect, sp_min, new GUIContent(sp_min.displayName));
|
||||
|
||||
vRect = new Rect(srcPos.width - 60, position.y, 60, position.height);
|
||||
SerializedProperty sp_max = property.FindPropertyRelative("Max");
|
||||
EditorGUI.PropertyField(vRect, sp_max, new GUIContent(sp_max.displayName));
|
||||
|
||||
if (sp_min.intValue < 0) sp_min.intValue = 0;
|
||||
if (sp_max.intValue < 0) sp_max.intValue = 0;
|
||||
if (sp_min.intValue > sp_max.intValue) sp_max.intValue = sp_min.intValue;
|
||||
if (sp_max.intValue < sp_min.intValue) sp_min.intValue = sp_max.intValue;
|
||||
EditorGUI.indentLevel = preInd;
|
||||
|
||||
EditorGUIUtility.labelWidth = 0;
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public struct MinMaxF
|
||||
{
|
||||
public float Min;
|
||||
public float Max;
|
||||
|
||||
public MinMaxF(float min, float max)
|
||||
{
|
||||
Min = min;
|
||||
Max = max;
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomPropertyDrawer(typeof(MinMaxF))]
|
||||
public class MinMaxFDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
Rect srcPos = position;
|
||||
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
|
||||
EditorGUIUtility.labelWidth = 30;
|
||||
float labelW = EditorStyles.label.CalcSize(label).x;
|
||||
var vRect = new Rect(srcPos.width - 60 * 2f - 10, position.y, 60, position.height);
|
||||
|
||||
SerializedProperty sp_min = property.FindPropertyRelative("Min");
|
||||
EditorGUI.PropertyField(vRect, sp_min, new GUIContent(sp_min.displayName));
|
||||
|
||||
vRect = new Rect(srcPos.width - 60, position.y, 60, position.height);
|
||||
SerializedProperty sp_max = property.FindPropertyRelative("Max");
|
||||
EditorGUI.PropertyField(vRect, sp_max, new GUIContent(sp_max.displayName));
|
||||
|
||||
if (sp_min.floatValue < 0) sp_min.floatValue = 0;
|
||||
if (sp_max.floatValue < 0) sp_max.floatValue = 0;
|
||||
if (sp_min.floatValue > sp_max.floatValue) sp_max.floatValue = sp_min.floatValue;
|
||||
if (sp_max.floatValue < sp_min.floatValue) sp_min.floatValue = sp_max.floatValue;
|
||||
|
||||
EditorGUIUtility.labelWidth = 0;
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4932220c7baba7c4a8443be83fadf3a5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dda665751142e2547a8b1bf79e9aae24
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "AD_FimpMeshGenerating",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:0e6b1f35d8416da46a5e09a445db4184",
|
||||
"GUID:4d3c0eb3c5c6f2243952516f8611fff4",
|
||||
"GUID:67234053b6be56d4680434077ca8fd90",
|
||||
"GUID:cd9949e6b11bcee44bc837d46dbfb86b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 934bdcc94c091ac4db37ff5fa788089b
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user