Add AI and Patrol components, update related resources and presenters
This commit is contained in:
17
Code/Resources/AIComponentResource.cs
Normal file
17
Code/Resources/AIComponentResource.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using GameCore.AI;
|
||||
using Godot;
|
||||
|
||||
namespace CryptonymThunder.Code.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class AIComponentResource : Resource
|
||||
{
|
||||
[Export] public AIState InitialState { get; set; } = AIState.Idle;
|
||||
|
||||
[ExportGroup("Personality")]
|
||||
[Export(PropertyHint.Range, "1.0, 100.0, 0.1")] public float SightRange { get; set; } = 20f;
|
||||
[Export(PropertyHint.Range, "1.0, 180.0, 0.1")] public float FieldOfView { get; set; } = 90f; // In degrees
|
||||
[Export(PropertyHint.Range, "0.1, 100.0, 0.1")] public float AttackRange { get; set; } = 10f;
|
||||
[Export(PropertyHint.Range, "0.0, 30.0, 0.1")] public float ChaseGiveUpTime { get; set; } = 5.0f; // Time to chase after losing sight
|
||||
[Export(PropertyHint.Range, "0.0, 5.0, 0.05")] public float ReactionTime { get; set; } = 0.5f; // Delay before seeing player
|
||||
}
|
||||
1
Code/Resources/AIComponentResource.cs.uid
Normal file
1
Code/Resources/AIComponentResource.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cq6c0en5gw7ia
|
||||
10
Code/Resources/PatrolComponentResource.cs
Normal file
10
Code/Resources/PatrolComponentResource.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
namespace CryptonymThunder.Code.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class PatrolComponentResource : Resource
|
||||
{
|
||||
[Export] public bool IsLooping { get; set; } = false;
|
||||
}
|
||||
1
Code/Resources/PatrolComponentResource.cs.uid
Normal file
1
Code/Resources/PatrolComponentResource.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dknbh3vlew4v5
|
||||
Reference in New Issue
Block a user