Rework enemy behavior (still in progress but shouldn't crash)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
uid://ci7va4hsq6hyt
|
||||
@@ -0,0 +1 @@
|
||||
uid://87d8kluait8y
|
||||
@@ -0,0 +1,9 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c7e5g8l6wuph"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://87d8kluait8y" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"]
|
||||
|
||||
[node name="NavigationAgent" type="NavigationAgent3D"]
|
||||
avoidance_enabled = true
|
||||
debug_enabled = true
|
||||
script = ExtResource("1_lobva")
|
||||
_patrolSpeed = 100.0
|
||||
3
Zennysoft.Game.Ma.Implementation/Entity/Damage.cs
Normal file
3
Zennysoft.Game.Ma.Implementation/Entity/Damage.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public record Damage(int BaseDamage, ElementType ElementType, bool IsCriticalHit, bool IgnoreDefense, bool IgnoreElementalResistance);
|
||||
29
Zennysoft.Game.Ma.Implementation/Entity/IEnemy.cs
Normal file
29
Zennysoft.Game.Ma.Implementation/Entity/IEnemy.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Godot;
|
||||
using System.Collections.Immutable;
|
||||
using Zennysoft.Game.Ma;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter.Entity
|
||||
{
|
||||
public interface IEnemy
|
||||
{
|
||||
public void Activate();
|
||||
|
||||
public void Idle();
|
||||
|
||||
public void Die();
|
||||
|
||||
public void PerformAction();
|
||||
|
||||
public void ReturnToDefaultState();
|
||||
|
||||
public void TakeDamage(int damage);
|
||||
|
||||
public void SetTarget(Vector3 targetPosition);
|
||||
|
||||
public void SetEnemyPosition(Vector3 position);
|
||||
|
||||
public void LookAtTarget(Vector3 target);
|
||||
|
||||
public IDungeonRoom GetCurrentRoom(ImmutableList<IDungeonRoom> dungeonRooms);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter.Entity
|
||||
{
|
||||
public interface IKnockbackable
|
||||
{
|
||||
void Knockback(float impulse, Vector3 direction);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user