made weapon into a dependant and used new forgeneitty node as a node3d
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// Copyright © Gamesmiths Guild.
|
||||
|
||||
using System;
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Gamesmiths.Forge.Core;
|
||||
@@ -12,14 +11,13 @@ using Gamesmiths.Forge.Godot.Resources;
|
||||
using Gamesmiths.Forge.Statescript;
|
||||
using Gamesmiths.Forge.Tags;
|
||||
using Godot;
|
||||
using Node = Godot.Node;
|
||||
|
||||
namespace Movementtests.tools;
|
||||
|
||||
[GlobalClass]
|
||||
[Icon("uid://cu6ncpuumjo20")]
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class ForgeEntityNode : Node, IForgeEntity
|
||||
public partial class ForgeEntityNode : Node3D, IForgeEntity
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ public class ExplodingSwordBehavior(PackedScene explosion, float radius) : IAbil
|
||||
return;
|
||||
}
|
||||
explo.Radius = radius;
|
||||
|
||||
|
||||
GD.Print("explosion");
|
||||
owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explo);
|
||||
explo.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user