Skip to content

Commit

Permalink
Version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunasawa committed May 18, 2024
1 parent 7dfa7b1 commit 65cc4b6
Show file tree
Hide file tree
Showing 26 changed files with 108 additions and 20 deletions.
4 changes: 4 additions & 0 deletions Editor/Elements/AI Behaviour Editor/EActionBox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System;
using System.Reflection;
using UnityEngine;
Expand Down Expand Up @@ -136,4 +138,6 @@ private void DeleteBox()
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Elements/AI Behaviour Editor/EBoxPanel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using UnityEngine.UIElements;
using YNL.Editors.Windows.Utilities;
using YNL.Editors.Windows;
Expand Down Expand Up @@ -84,4 +86,6 @@ public void CreateBox()
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Elements/AI Behaviour Editor/ESearchBox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using UnityEngine;
using UnityEngine.UIElements;
using YNL.Editors.Windows.Utilities;
Expand Down Expand Up @@ -39,4 +41,6 @@ public ESearchBox(string label, bool isAction) : base()
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Elements/AI Behaviour Editor/EStateBox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System.Linq;
using UnityEngine;
using UnityEngine.UIElements;
Expand Down Expand Up @@ -94,4 +96,6 @@ private void RemoveState()
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Elements/AI Behaviour Editor/EStatePanel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System;
using System.Linq;
using UnityEngine.UIElements;
Expand Down Expand Up @@ -80,4 +82,6 @@ public void SelectState(string stateName)
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Elements/AI Behaviour Editor/ETransitionBox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -181,4 +183,6 @@ private void DeleteBox()
}
}
}
#endif
#endif
#endif
7 changes: 7 additions & 0 deletions Editor/Elements/AI Icon Editor/EIconBox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES

#endif
#endif
#endif
8 changes: 7 additions & 1 deletion Editor/Elements/AI Icon Editor/EIconPanel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using UnityEngine;
using UnityEngine.UIElements;
using YNL.Editors.UIElements;
Expand All @@ -20,4 +23,7 @@ public EIconPanel()
this.AddElements(Wrapper);
}
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Utilities/EAIUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System.Reflection;
using System;
using UnityEngine.UIElements;
Expand Down Expand Up @@ -95,4 +97,6 @@ public static VisualElement CustomField(FieldInfo fieldInfo, string label, strin
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/WSimpleAIEditor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using UnityEditor;
using UnityEngine;
using YNL.Editors.UIElements;
Expand Down Expand Up @@ -98,3 +100,5 @@ public enum WRPGWindowTag
}
}
#endif
#endif
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System.Collections.Generic;
using System.Linq;
using YNL.Extensions.Methods;
Expand Down Expand Up @@ -82,4 +84,6 @@ public void UpdateTrueFalseState()
}
}
}
#endif
#endif
#endif
4 changes: 4 additions & 0 deletions Editor/Windows/AI Behaviour Editor/WAIBehaviourEditor_Main.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System;
using UnityEditor;
using UnityEngine;
Expand Down Expand Up @@ -45,4 +47,6 @@ public static class WAIBehaviourEditor_Action
public static Action<AIStateKey> RemoveState;
}
}
#endif
#endif
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using System.Collections.Generic;
using System.Linq;
using UnityEditor.UIElements;
Expand Down Expand Up @@ -104,6 +106,6 @@ private void SearchingChanged(ChangeEvent<string> evt)
}
}
}


#endif
#endif
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using UnityEngine;
using UnityEngine.UIElements;
using YNL.Editors.UIElements;
Expand Down Expand Up @@ -109,4 +111,6 @@ private void MainWindowHandler()
public void AddTransitionBoxes(params ETransitionBox[] boxes) => TransitionPanel.AddBoxes(boxes);
}
}
#endif
#endif
#endif
8 changes: 7 additions & 1 deletion Editor/Windows/AI Icon Editor/WAIIconEditor_Handler.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
namespace YNL.SimpleAISystem.Editors
{
public class WAIIconEditor_Handler
{

}
}
}
#endif
#endif
#endif
5 changes: 4 additions & 1 deletion Editor/Windows/AI Icon Editor/WAIIconEditor_Main.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#if UNITY_EDITOR
using System;
#if YNL_EDITOR
#if YNL_UTILITIES
using YNL.Editors.UIElements;
using YNL.Editors.Windows;
using YNL.Extensions.Methods;
Expand All @@ -21,4 +22,6 @@ public WAIIconEditor_Main(EWindowTagPanel tagPanel) : base()
}
}
}
#endif
#endif
#endif
10 changes: 8 additions & 2 deletions Editor/Windows/AI Icon Editor/WAIIconEditor_Visual.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using UnityEngine;
#if UNITY_EDITOR
#if YNL_EDITOR
#if YNL_UTILITIES
using UnityEngine;
using UnityEngine.UIElements;
using YNL.Editors.UIElements;
using YNL.Editors.Windows.Utilities;
Expand Down Expand Up @@ -74,4 +77,7 @@ private void PanelMarginHandler()
};
}
}
}
}
#endif
#endif
#endif
4 changes: 3 additions & 1 deletion Main/AI Behaviours/AIActionKey.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if YNL_UTILITIES
using System.Reflection;
using System;
using YNL.Utilities.Addons;
Expand Down Expand Up @@ -35,4 +36,5 @@ public void Update(string label)
}
}
}
}
}
#endif
8 changes: 4 additions & 4 deletions Main/AI Behaviours/AIBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Collections.Generic;
#if YNL_UTILITIES
using System.Collections.Generic;
using YNL.Extensions.Methods;

using YNL.Utilities.Addons;

#if UNITY_EDITOR
using UnityEditor.Callbacks;
using UnityEditor;
Expand Down Expand Up @@ -96,4 +95,5 @@ public SerializableDictionary<string, AIAction> GetActions(AIController controll
}
#endregion
}
}
}
#endif
4 changes: 3 additions & 1 deletion Main/AI Behaviours/AITransitionKey.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if YNL_UTILITIES
using System.Reflection;
using System;
using YNL.Utilities.Addons;
Expand Down Expand Up @@ -39,4 +40,5 @@ public void Update(string label)
}
}
}
}
}
#endif
4 changes: 3 additions & 1 deletion Main/AI Decisions/Decisions/AIDecisionDistanceToTarget.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if YNL_UTILITIES
using UnityEngine;
using YNL.Extensions.Methods;
using YNL.Utilities.Addons;
Expand Down Expand Up @@ -42,4 +43,5 @@ public enum NotEqualComparison
{
Greater, GreaterOrEqual, Lower, LowerOrEqual
}
}
}
#endif
4 changes: 3 additions & 1 deletion Main/AI Decisions/Decisions/AIDecisionTimeInState.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if YNL_UTILITIES
using System.Collections;
using UnityEngine;
using YNL.Extensions.Methods;
Expand Down Expand Up @@ -54,4 +55,5 @@ private IEnumerator GetAnimationLengthAfterOneFrame()
LimitTime = _animator.GetCurrentAnimatorStateInfo(0).length;
}
}
}
}
#endif
4 changes: 3 additions & 1 deletion Main/AI Objects/AIState.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if YNL_UTILITIES
using System.Collections.Generic;
using YNL.Extensions.Methods;

Expand Down Expand Up @@ -66,4 +67,5 @@ public void Exit()
foreach (AITransition transition in Transitions) if (!transition.Decision.IsNull()) transition.Decision.OnExitState();
}
}
}
}
#endif
4 changes: 3 additions & 1 deletion Main/AI Objects/AIUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if YNL_UTILITIES
using YNL.Extensions.Methods;

namespace YNL.SimpleAISystem
Expand All @@ -16,4 +17,5 @@ public static AIDecision GetDecision(this AIController controller, string label)
return (AIDecision)MType.CreateInstance($"YNL.SimpleAISystem.AIDecision{label}", controller);
}
}
}
}
#endif
6 changes: 4 additions & 2 deletions Main/AIController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
#if YNL_UTILITIES
using System.Linq;
using Unity.Collections;
using UnityEngine;
using YNL.Attributes;
Expand Down Expand Up @@ -134,4 +135,5 @@ protected virtual void ResetController()
}
#endregion
}
}
}
#endif
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.yunasawa.ynl.simpleaisystem",
"displayName": "YNL - Simple AI System",
"version": "1.1.2",
"version": "1.1.3",
"unity": "2022.3",
"description": "YNL - Simple AI System provides you a simple system to handle objects' behaviours as an AI.",
"keywords": [
Expand Down

0 comments on commit 65cc4b6

Please sign in to comment.