new forge entity node to benefit from autoinject
This commit is contained in:
@@ -25,6 +25,7 @@ using Movementtests.interfaces;
|
||||
using Movementtests.systems;
|
||||
using Movementtests.player_controller.Scripts;
|
||||
using Movementtests.managers;
|
||||
using Movementtests.tools;
|
||||
using RustyOptions;
|
||||
using Node = Godot.Node;
|
||||
|
||||
@@ -455,15 +456,7 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
|
||||
LoadSettings();
|
||||
|
||||
// General use stuff
|
||||
List<AttributeSet> attributeSetList = [];
|
||||
foreach (var node in GetChildren())
|
||||
{
|
||||
if (node is not ForgeAttributeSet attributeSetNode) continue;
|
||||
var attributeSet = attributeSetNode.GetAttributeSet();
|
||||
if (attributeSet is not null)
|
||||
attributeSetList.Add(attributeSet);
|
||||
}
|
||||
Attributes = new EntityAttributes([.. attributeSetList]);
|
||||
Attributes = new EntityAttributes([.. ForgeUtils.CollectAttributeList(this)]);
|
||||
HealthAttribute = Attributes["PlayerAttributeSet.Health"];
|
||||
ManaAttribute = Attributes["PlayerAttributeSet.Mana"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user