basic interface and no success trying to use them in a Tool script

This commit is contained in:
2026-01-16 18:35:58 +01:00
parent fd3eb35782
commit 255b87f991
9 changed files with 135 additions and 4 deletions

View File

@@ -2,7 +2,9 @@ using Godot;
using System;
using Movementtests.player_controller.Scripts;
public partial class FirstEnemy : CharacterBody3D
[GlobalClass]
public partial class FirstEnemy : CharacterBody3D, ISpawnable
{
[Export]
public Node3D Target { get; set; }
@@ -17,6 +19,16 @@ public partial class FirstEnemy : CharacterBody3D
_wallInFrontRayCast = GetNode<RayCast3D>("WallInFrontRayCast");
}
public Resource GetSpawnInitResource()
{
return Inputs;
}
public void TestMethod()
{
GD.Print("I'm an enemy");
}
public override void _PhysicsProcess(double delta)
{
var target = Target.GlobalPosition;