moving further through forge godot-available resources and interfaces
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Gamesmiths.Forge.Abilities;
|
||||
using Gamesmiths.Forge.Attributes;
|
||||
using Gamesmiths.Forge.Core;
|
||||
using Gamesmiths.Forge.Effects;
|
||||
using Gamesmiths.Forge.Effects.Calculator;
|
||||
@@ -10,6 +11,8 @@ using Gamesmiths.Forge.Effects.Magnitudes;
|
||||
using Gamesmiths.Forge.Effects.Periodic;
|
||||
using Gamesmiths.Forge.Events;
|
||||
using Gamesmiths.Forge.Godot.Core;
|
||||
using Gamesmiths.Forge.Godot.Nodes;
|
||||
using Gamesmiths.Forge.Godot.Resources;
|
||||
using Gamesmiths.Forge.Tags;
|
||||
using Godot;
|
||||
using GodotStateCharts;
|
||||
@@ -47,6 +50,10 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
||||
[Signal]
|
||||
public delegate void WeaponRetrievedEventHandler();
|
||||
|
||||
|
||||
[Export]
|
||||
public ForgeTagContainer BaseTags { get; set; } = new();
|
||||
|
||||
[Export]
|
||||
public RDamage RDamage { get; set; }
|
||||
[Export(PropertyHint.Range, "0,100,1,or_greater")]
|
||||
@@ -147,14 +154,22 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
||||
|
||||
WeaponFlyingAbilityTag = Tag.RequestTag(tagsManager,"abilities.weapon.flying");
|
||||
|
||||
var baseTags = new TagContainer(
|
||||
tagsManager,
|
||||
[
|
||||
Tag.RequestTag(tagsManager, "weapon"),
|
||||
]);
|
||||
List<AttributeSet> attributeSetList = [];
|
||||
foreach (Node node in GetChildren())
|
||||
{
|
||||
if (node is ForgeAttributeSet attributeSetNode)
|
||||
{
|
||||
AttributeSet? attributeSet = attributeSetNode.GetAttributeSet();
|
||||
|
||||
if (attributeSet is not null)
|
||||
{
|
||||
attributeSetList.Add(attributeSet);
|
||||
}
|
||||
}
|
||||
}
|
||||
Attributes = new EntityAttributes([.. attributeSetList]);
|
||||
|
||||
Attributes = new EntityAttributes(new WeaponAttributeSet());
|
||||
Tags = new EntityTags(baseTags);
|
||||
Tags = new(BaseTags.GetTagContainer());
|
||||
EffectsManager = new EffectsManager(this, cuesManager);
|
||||
Abilities = new(this);
|
||||
Events = new();
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
|
||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_m0v1h"]
|
||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_3xjpi"]
|
||||
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
|
||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
|
||||
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
|
||||
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
|
||||
[ext_resource type="Script" uid="uid://cf1nsco3w0mf6" path="res://addons/godot_state_charts/transition.gd" id="6_jpdh0"]
|
||||
@@ -13,6 +15,12 @@ script = ExtResource("2_m0v1h")
|
||||
DamageDealt = 2.0
|
||||
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pgbtr"]
|
||||
script = ExtResource("4_q6xv7")
|
||||
Default = 1
|
||||
Min = 1
|
||||
Max = 100
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_avini"]
|
||||
height = 1.0
|
||||
radius = 0.1
|
||||
@@ -50,6 +58,14 @@ max_contacts_reported = 1
|
||||
script = ExtResource("1_csqwk")
|
||||
RDamage = SubResource("Resource_jpdh0")
|
||||
|
||||
[node name="WeaponAttributeSet" type="Node" parent="." unique_id=14845649]
|
||||
script = ExtResource("3_3xjpi")
|
||||
AttributeSetClass = "WeaponAttributeSet"
|
||||
InitialAttributeValues = Dictionary[String, ExtResource("4_q6xv7")]({
|
||||
"Level": SubResource("Resource_pgbtr")
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="WeaponFlyingTick" type="Timer" parent="." unique_id=656309486]
|
||||
wait_time = 0.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user