Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunasawa committed May 29, 2024
1 parent 4935ac1 commit 2141577
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Editor/Elements/AI Behaviour Editor/EActionBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ private void ExpandView()

public void AddProperties()
{
Type type = Type.GetType($"YNL.SimpleAISystem.AIAction{_key.Label}");
Type type = MType.GetTypeIgnoreAssembly($"YNL.SimpleAISystem.AIAction{_key.Label}");

if (type.IsNull()) return;

FieldInfo[] fields = type.GetFieldsInSubclass();
Expand Down
3 changes: 2 additions & 1 deletion Editor/Elements/AI Behaviour Editor/ETransitionBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ private void ExpandView()
}
public void AddProperties()
{
Type type = Type.GetType($"YNL.SimpleAISystem.AIDecision{_key.Label}");
Type type = MType.GetTypeIgnoreAssembly($"YNL.SimpleAISystem.AIDecision{_key.Label}");

if (type.IsNull()) return;

FieldInfo[] fields = type.GetFieldsInSubclass();
Expand Down
49 changes: 49 additions & 0 deletions Main/AI Actions/Actions/AIActionTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using UnityEngine;
using YNL.Extensions.Methods;
using YNL.Utilities.Addons;

#if true

namespace YNL.SimpleAISystem
{
public class AIActionTest: AIAction
{
public AIActionTest() : base(null) { }
public AIActionTest(AIController controller) : base(controller) { }

private Rigidbody _rigidbody;
public int Distance;
public KeyCode KeyCode;

public override void Initialize(AIController controller)
{
base.Initialize(controller);

//_rigidbody = controller.Root.GetComponent<Rigidbody>();

//MDebug.Log("ASDASDASD");
}

public override void Convert(SerializableDictionary<string, string> properties)
{
Distance = int.Parse(properties["Distance"]);
KeyCode = MEnum.Parse<KeyCode>(properties["KeyCode"]);
}

public override void DoAction()
{
// Perform the actions
}

public override void OnEnterState()
{
// Do something when entering the state
}

public override void OnExitState()
{
// Do something when exiting the state
}
}
}
#endif
11 changes: 11 additions & 0 deletions Main/AI Actions/Actions/AIActionTest.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Setups/EditorDefineSymbols.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public static void AddSymbols(params string[] symbols)
{
if (HasSymbol(symbol)) continue;
_defineSymbols.Add(symbol);
NotifySymbols(symbol, true);
}
PlayerSettings.SetScriptingDefineSymbols(NamedBuildTarget.Standalone, String.Join(";", _defineSymbols));
NotifySymbols(String.Join("; ", symbols), true);
}

/// <summary> Remove a single symbol </summary>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "com.yunasawa.ynl.simpleaisystem",
"displayName": "YNL - Simple AI System",
"version": "1.1.10",
"version": "1.1.11",
"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 2141577

Please sign in to comment.