poprawki materialy unity 6, pajaki, podmiana katalogu FSM w AIControlerze, zmiana w Spider 2.0 Behaviours , skopane zycie bylo, ladowalo pajaka z zyciem 2.
This commit is contained in:
@@ -10,3 +10,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/AIDefineSymbols.cs
|
||||
uploadId: 601882
|
||||
|
||||
@@ -98,3 +98,10 @@ TextureImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/Icons/cover_icon.png
|
||||
uploadId: 601882
|
||||
|
||||
@@ -6,3 +6,10 @@ NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/New Animator Controller.controller
|
||||
uploadId: 601882
|
||||
|
||||
@@ -90,3 +90,10 @@ TextureImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/Resources/AI-icon.png
|
||||
uploadId: 601882
|
||||
|
||||
@@ -10,3 +10,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/vAICoverAreaEditor.cs
|
||||
uploadId: 601882
|
||||
|
||||
@@ -9,3 +9,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/vAICoverPointEditor.cs
|
||||
uploadId: 601882
|
||||
|
||||
@@ -10,8 +10,7 @@ namespace Invector.vCharacterController.AI
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(vAITarget),true)]
|
||||
public class vAITargetDrawer : PropertyDrawer
|
||||
{
|
||||
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
|
||||
@@ -40,11 +39,13 @@ namespace Invector.vCharacterController.AI
|
||||
rect.width = EditorGUIUtility.singleLineHeight;
|
||||
property.isExpanded = EditorGUI.Foldout(rect, property.isExpanded, "");
|
||||
rect.width = oldWidth;
|
||||
}
|
||||
EditorGUI.PropertyField(rect, property.FindPropertyRelative("_transform"), !property.propertyPath.Contains("Array")?GUIContent.none:label);
|
||||
|
||||
}
|
||||
SerializedProperty transformProp = property.FindPropertyRelative("_transform");
|
||||
GUI.color =transformProp.objectReferenceValue!=null? ( property.FindPropertyRelative("isFixedTarget").boolValue ? Color.red : Color.green):Color.grey;
|
||||
EditorGUI.PropertyField(rect, transformProp, !property.propertyPath.Contains("Array")?GUIContent.none:label);
|
||||
GUI.color = Color.white;
|
||||
rect.y += EditorGUIUtility.singleLineHeight;
|
||||
|
||||
GUI.enabled = true;
|
||||
if (property.hasVisibleChildren && property.isExpanded)
|
||||
{
|
||||
var childEnum = property.GetEnumerator();
|
||||
@@ -52,16 +53,22 @@ namespace Invector.vCharacterController.AI
|
||||
while (childEnum.MoveNext())
|
||||
{
|
||||
var current = childEnum.Current as SerializedProperty;
|
||||
|
||||
if (property.name!=("_transform"))
|
||||
{
|
||||
|
||||
rect.height = EditorGUI.GetPropertyHeight(current);
|
||||
EditorGUI.PropertyField(rect, current);
|
||||
if (property.name == "_tag")
|
||||
{
|
||||
EditorGUI.LabelField(rect, "Tag", property.stringValue,EditorStyles.linkLabel);
|
||||
}
|
||||
else EditorGUI.PropertyField(rect, current);
|
||||
rect.y += EditorGUI.GetPropertyHeight(current);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (GUI.changed) property.serializedObject.ApplyModifiedProperties();
|
||||
EditorGUI.EndProperty();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d5b996c44e0f9b4b9c83a3be406fada
|
||||
guid: 4f74a5b81ec11314eb2a925b1385d794
|
||||
timeCreated: 1524181504
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
@@ -10,3 +10,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/vAITargetDrawer.cs
|
||||
uploadId: 601882
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Invector.vCharacterController.AI
|
||||
public SerializedProperty debug;
|
||||
public Color minDistColor = new Color(0, 0, 0, 1f);
|
||||
public Color maxDistColor = new Color(1, 1, 0, 1f);
|
||||
public Color lostDistColor = new Color(0.5f, 0.5f, 0, 1f);
|
||||
public Color lostDistColor = new Color(1f, 0, 0, 1f);
|
||||
public Color combatColor = new Color(0, 0, 1, 1f);
|
||||
public GUIStyle labelStyle;
|
||||
|
||||
@@ -36,23 +36,23 @@ namespace Invector.vCharacterController.AI
|
||||
|
||||
protected virtual void OnSceneGUI()
|
||||
{
|
||||
if (debug == null || !debug.boolValue) return;
|
||||
if (debug == null || !debug.boolValue||target ==null) return;
|
||||
vIControlAICombat combatControl = null;
|
||||
if (target is vIControlAICombat)
|
||||
{
|
||||
combatControl = target as vIControlAICombat;
|
||||
}
|
||||
|
||||
if (combatControl == null ) return;
|
||||
DrawGizmos(combatControl);
|
||||
DrawDebugWindow(combatControl);
|
||||
}
|
||||
|
||||
private void DrawGizmos(vIControlAICombat combatControl)
|
||||
{
|
||||
minDistColor.a = .2f;
|
||||
maxDistColor.a = .2f;
|
||||
lostDistColor.a = .2f;
|
||||
combatColor.a = .2f;
|
||||
minDistColor.a = .1f;
|
||||
maxDistColor.a = .1f;
|
||||
lostDistColor.a = .1f;
|
||||
combatColor.a = .1f;
|
||||
|
||||
var transform = (eyes != null && eyes.objectReferenceValue != null ? (eyes.objectReferenceValue as Transform) : (target as MonoBehaviour).transform);
|
||||
float _fov = fov != null ? fov.floatValue : 0;
|
||||
@@ -60,28 +60,49 @@ namespace Invector.vCharacterController.AI
|
||||
if (combatControl != null)
|
||||
{
|
||||
Handles.color = combatColor;
|
||||
Handles.DrawSolidDisc((target as MonoBehaviour).transform.position, Vector3.up, combatControl.combatRange);
|
||||
Handles.DrawSolidDisc(combatControl.transform.position, Vector3.up, combatControl.combatRange);
|
||||
combatColor.a = 1;
|
||||
Handles.color = combatColor;
|
||||
Handles.DrawWireDisc(combatControl.transform.position, Vector3.up, combatControl.combatRange);
|
||||
}
|
||||
|
||||
if (maxDist != null)
|
||||
{
|
||||
Handles.color = maxDistColor;
|
||||
|
||||
var forward = transform.forward;
|
||||
forward.y = 0;
|
||||
|
||||
Handles.DrawSolidArc(transform.position, Vector3.up, forward, _fov * 0.5f, maxDist.floatValue);
|
||||
Handles.DrawSolidArc(transform.position, Vector3.up, forward, -(_fov * 0.5f), maxDist.floatValue);
|
||||
Handles.color = lostDistColor;
|
||||
Handles.DrawSolidDisc(transform.position, Vector3.up, maxDist.floatValue + lostDist.floatValue);
|
||||
lostDistColor.a = 1;
|
||||
Handles.color = lostDistColor;
|
||||
Handles.DrawWireDisc(transform.position, Vector3.up, maxDist.floatValue + lostDist.floatValue);
|
||||
Handles.color = maxDistColor;
|
||||
Handles.DrawSolidArc(transform.position, Vector3.up, forward, _fov * 0.5f, maxDist.floatValue);
|
||||
Handles.DrawSolidArc(transform.position, Vector3.up, forward, -(_fov * 0.5f), maxDist.floatValue);
|
||||
maxDistColor.a = 1;
|
||||
Handles.color = maxDistColor;
|
||||
Quaternion leftRayRotation = Quaternion.AngleAxis(-_fov * 0.5f, Vector3.up);
|
||||
Quaternion rightRayRotation = Quaternion.AngleAxis(_fov * 0.5f, Vector3.up);
|
||||
Vector3 leftRayDirection = leftRayRotation * transform.forward;
|
||||
Vector3 rightRayDirection = rightRayRotation * transform.forward;
|
||||
Handles.DrawLine(transform.position, transform.position + leftRayDirection * maxDist.floatValue);
|
||||
Handles.DrawLine(transform.position, transform.position+ rightRayDirection * maxDist.floatValue);
|
||||
|
||||
Handles.DrawWireDisc(transform.position, Vector3.up, maxDist.floatValue);
|
||||
|
||||
}
|
||||
|
||||
if (minDist != null)
|
||||
{
|
||||
Handles.color = minDistColor;
|
||||
Handles.DrawSolidDisc(transform.position, Vector3.up, minDist.floatValue);
|
||||
minDistColor.a = 1;
|
||||
Handles.color = minDistColor;
|
||||
Handles.DrawWireDisc(transform.position, Vector3.up, minDist.floatValue);
|
||||
}
|
||||
}
|
||||
|
||||
GUIContent content;
|
||||
private void DrawDebugWindow(vIControlAICombat combatControl)
|
||||
{
|
||||
Handles.BeginGUI();
|
||||
@@ -96,37 +117,42 @@ namespace Invector.vCharacterController.AI
|
||||
GUILayout.Label(m_Logo, skin.label, GUILayout.MaxHeight(25));
|
||||
GUILayout.Space(10);
|
||||
|
||||
GUI.color = minDistColor;
|
||||
if (content == null) content = new GUIContent(EditorGUIUtility.whiteTexture);
|
||||
GUILayout.BeginHorizontal("box");
|
||||
{
|
||||
GUI.color = color;
|
||||
GUILayout.Box("Min Distance To Detect", labelStyle);
|
||||
GUI.color = minDistColor;
|
||||
content.text = "Min Distance To Detect";
|
||||
GUILayout.Label(content, labelStyle);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUI.color = maxDistColor;
|
||||
|
||||
GUILayout.BeginHorizontal("box");
|
||||
{
|
||||
GUI.color = color;
|
||||
GUILayout.Label("Max Distance To Detect", labelStyle);
|
||||
GUI.color = maxDistColor;
|
||||
content.text = "Max Distance To Detect";
|
||||
|
||||
GUILayout.Label(content, labelStyle);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUI.color = lostDistColor;
|
||||
|
||||
GUILayout.BeginHorizontal("box");
|
||||
{
|
||||
GUI.color = color;
|
||||
GUILayout.Box("Lost Target Distance", labelStyle);
|
||||
GUI.color = lostDistColor;
|
||||
content.text = "Lost Target Distance";
|
||||
GUILayout.Label(content, labelStyle);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
if (combatControl != null)
|
||||
{
|
||||
GUI.color = combatColor;
|
||||
|
||||
GUILayout.BeginHorizontal("box");
|
||||
{
|
||||
GUI.color = color;
|
||||
GUILayout.Box("Combat Range", labelStyle);
|
||||
GUI.color = combatColor;
|
||||
content.text = "Combat Range";
|
||||
GUILayout.Label(content, labelStyle);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
@@ -10,3 +10,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/vControlAIEditor.cs
|
||||
uploadId: 601882
|
||||
|
||||
@@ -10,3 +10,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scripts/Editor/vCreateAIWindow.cs
|
||||
uploadId: 601882
|
||||
|
||||
Reference in New Issue
Block a user