Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 150e007b22 | |||
| 01a2e7582b |
@@ -44,6 +44,10 @@ public partial class ForgeEntityNode : Node3D, IForgeEntity
|
||||
public required Variables SharedVariables { get; set; }
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
BaseTags ??= new ForgeTagContainer();
|
||||
Tags = new EntityTags(BaseTags.GetTagContainer());
|
||||
@@ -53,10 +57,7 @@ public partial class ForgeEntityNode : Node3D, IForgeEntity
|
||||
|
||||
SharedVariables = new Variables();
|
||||
SharedVariableDefinitions?.PopulateVariables(SharedVariables);
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
EffectsManager = new EffectsManager(this, CuesManager);
|
||||
var effectApplier = new EffectApplier(this);
|
||||
effectApplier.ApplyEffects(this, this, this);
|
||||
|
||||
42
forge/abilities/ForgeSpawnProjectileBehavior.cs
Normal file
42
forge/abilities/ForgeSpawnProjectileBehavior.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Gamesmiths.Forge.Abilities;
|
||||
using Gamesmiths.Forge.Effects;
|
||||
using Gamesmiths.Forge.Godot.Resources;
|
||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||
using Godot;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
namespace Movementtests.forge.abilities;
|
||||
|
||||
|
||||
public class SpawnProjectileBehavior(PackedScene projectileScene) : IAbilityBehavior
|
||||
{
|
||||
public void OnStarted(AbilityBehaviorContext context)
|
||||
{
|
||||
if (context.Target is not Node3D target || context.Source is not Node3D source) return;
|
||||
|
||||
var sourceLocation = source.GlobalPosition;
|
||||
|
||||
if (projectileScene.Instantiate() is not Projectile projectile) return;
|
||||
source.GetTree().GetCurrentScene().AddChild(projectile);
|
||||
|
||||
projectile.GlobalPosition = source is ITargetable targetable ? targetable.GetTargetGlobalPosition() : sourceLocation;
|
||||
projectile.Target = target;
|
||||
if (projectile is ISpawnable spawnable) spawnable.Init();
|
||||
|
||||
context.AbilityHandle.CommitAbility();
|
||||
context.InstanceHandle.End();
|
||||
}
|
||||
|
||||
public void OnEnded(AbilityBehaviorContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class ForgeSpawnProjectileBehavior : ForgeAbilityBehavior
|
||||
{
|
||||
[Export] public required PackedScene Projectile { get; set; }
|
||||
public override IAbilityBehavior GetBehavior() => new SpawnProjectileBehavior(Projectile);
|
||||
}
|
||||
1
forge/abilities/ForgeSpawnProjectileBehavior.cs.uid
Normal file
1
forge/abilities/ForgeSpawnProjectileBehavior.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dxtjifb8hv8k4
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_l686n")
|
||||
RegisteredTags = Array[String](["character.player", "character.enemy", "weapon", "status.stunned", "status.burning", "status.frozen", "abilities.weapon.land", "abilities.weapon.flying", "abilities.weapon.left", "events.combat.damage", "events.combat.hit", "events.weapon.flyingTick", "events.weapon.startedFlying", "events.weapon.stoppedFlying", "events.weapon.handToFlying", "events.weapon.flyingToHand", "events.weapon.plantedToHand", "events.weapon.plantedToFlying", "events.weapon.planted", "cooldown.empoweredAction", "cooldown.empoweredSwordThrow", "cues.resources.mana", "events.player.empowered_action_used", "cues.resources.mana.inhibited", "cues.resources.health", "cooldown.enemy.hit", "events.combat.death", "cooldown.hit", "events.player.hit", "cues.enemy.health", "immunity.damage", "status", "traits.damageable", "traits.knockbackable", "events.combat.knockback_dealt", "events.combat.knockback_received", "events.weapon.plantedtick", "events.weapon.unplanted", "abilities.weapon.planted"])
|
||||
RegisteredTags = Array[String](["character.player", "character.enemy", "status.stunned", "status.burning", "status.frozen", "abilities.weapon.land", "abilities.weapon.flying", "abilities.weapon.left", "events.combat.damage", "events.combat.hit", "events.weapon.flyingTick", "events.weapon.startedFlying", "events.weapon.stoppedFlying", "events.weapon.handToFlying", "events.weapon.flyingToHand", "events.weapon.plantedToHand", "events.weapon.plantedToFlying", "events.weapon.planted", "cooldown.empoweredAction", "cooldown.empoweredSwordThrow", "cues.resources.mana", "events.player.empowered_action_used", "cues.resources.mana.inhibited", "cues.resources.health", "cooldown.enemy.hit", "events.combat.death", "cooldown.hit", "events.player.hit", "cues.enemy.health", "immunity.damage", "status", "traits.damageable", "traits.knockbackable", "events.combat.knockback_dealt", "events.combat.knockback_received", "events.weapon.plantedtick", "events.weapon.unplanted", "abilities.weapon.planted", "events.enemy.try_hit", "events.enemy.launch_projectile", "objects.projectile", "objects.weapon", "events.enemy.request_projectile"])
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="10_m4f1m"]
|
||||
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="11_8c5sq"]
|
||||
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="12_2x5q6"]
|
||||
[ext_resource type="Resource" uid="uid://csh8jcxtrs11k" path="res://forge/resources/tag_containers/on_enemy_try_hit.tres" id="12_f6jpb"]
|
||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="13_4nn3y"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rjo6h"]
|
||||
@@ -154,5 +155,7 @@ script = ExtResource("13_4nn3y")
|
||||
Name = "Hit"
|
||||
CooldownEffects = [SubResource("Resource_0gdnn")]
|
||||
AbilityBehavior = SubResource("Resource_m0osh")
|
||||
TriggerSource = 1
|
||||
TriggerTag = ExtResource("12_f6jpb")
|
||||
ActivationBlockedTags = SubResource("Resource_msmv1")
|
||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||
|
||||
@@ -30,8 +30,8 @@ BaseValue = 1
|
||||
[sub_resource type="Resource" id="Resource_hgeae"]
|
||||
script = ExtResource("4_4348y")
|
||||
Name = "Raise Planted Tick Periodically"
|
||||
Modifiers = null
|
||||
Components = null
|
||||
Modifiers = []
|
||||
Components = []
|
||||
Executions = Array[Object]([SubResource("Resource_l3tir")])
|
||||
DurationType = 1
|
||||
HasPeriodicApplication = true
|
||||
@@ -39,7 +39,7 @@ Period = SubResource("Resource_cykp3")
|
||||
ExecuteOnApplication = true
|
||||
StackLimit = SubResource("Resource_rvogu")
|
||||
InitialStack = SubResource("Resource_yc0gp")
|
||||
Cues = null
|
||||
Cues = []
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_jiqxq"]
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
[resource]
|
||||
script = ExtResource("2_f5qgs")
|
||||
EffectData = ExtResource("1_hlq5f")
|
||||
Name = "Planted tick application"
|
||||
Name = "Flying tick application"
|
||||
metadata/_custom_type_script = "uid://cl5hudinl1rex"
|
||||
|
||||
@@ -20,7 +20,7 @@ BaseValue = 1
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_7ma6b")
|
||||
Name = "Call Planted Tick Event Periodically"
|
||||
Name = "Call Flying Tick Event Periodically"
|
||||
Modifiers = []
|
||||
Components = []
|
||||
Executions = Array[Object]([ExtResource("1_cd13a")])
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="ForgeTag" format=3 uid="uid://bkr1xfokymvp4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="1_ux16b"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ux16b")
|
||||
Tag = "events.enemy.launch_projectile"
|
||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||
8
forge/resources/tag_containers/on_enemy_try_hit.tres
Normal file
8
forge/resources/tag_containers/on_enemy_try_hit.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="ForgeTag" format=3 uid="uid://csh8jcxtrs11k"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="1_3ab6s"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3ab6s")
|
||||
Tag = "events.enemy.try_hit"
|
||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||
@@ -50,7 +50,6 @@ EnemyToSpawn = ExtResource("5_iq67o")
|
||||
MovementInputs = ExtResource("6_l44fp")
|
||||
Target = NodePath("../Player")
|
||||
SpawnInterval = 5.0
|
||||
IsActiveOnStart = false
|
||||
|
||||
[node name="GroundedSpawner3" parent="." index="10" unique_id=241829575 node_paths=PackedStringArray("Target") instance=ExtResource("4_jaqjx")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 44.5, 0, -3)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="7_vkl5g"]
|
||||
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="8_1upfw"]
|
||||
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="9_ynw2y"]
|
||||
[ext_resource type="PackedScene" uid="uid://dx3y8sjftqk8f" path="res://scenes/enemies/projectile_enemy/projectile_enemy.tscn" id="10_mm5sa"]
|
||||
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="11_luuoi"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xixm3"]
|
||||
@@ -110,19 +111,23 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 7, -16)
|
||||
Target = NodePath("../Player")
|
||||
RMovement = SubResource("Resource_xixm3")
|
||||
|
||||
[node name="GroundedSpawner" parent="." index="14" unique_id=557145011 node_paths=PackedStringArray("Target") instance=ExtResource("8_1upfw")]
|
||||
[node name="ProjectileEnemy" parent="." index="14" unique_id=1747444936 node_paths=PackedStringArray("Target") instance=ExtResource("10_mm5sa")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.0893264, -1.9073486e-06, -17.405575)
|
||||
Target = NodePath("../Player")
|
||||
|
||||
[node name="GroundedSpawner" parent="." index="15" unique_id=557145011 node_paths=PackedStringArray("Target") instance=ExtResource("8_1upfw")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2.5, -15)
|
||||
EnemyToSpawn = ExtResource("4_1cb4f")
|
||||
MovementInputs = ExtResource("9_ynw2y")
|
||||
Target = NodePath("../Player")
|
||||
IsActiveOnStart = false
|
||||
|
||||
[node name="FlyingSpawner" parent="." index="15" unique_id=974076606 node_paths=PackedStringArray("Target") instance=ExtResource("8_1upfw")]
|
||||
[node name="FlyingSpawner" parent="." index="16" unique_id=974076606 node_paths=PackedStringArray("Target") instance=ExtResource("8_1upfw")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 11, -14)
|
||||
EnemyToSpawn = ExtResource("7_vkl5g")
|
||||
MovementInputs = ExtResource("11_luuoi")
|
||||
Target = NodePath("../Player")
|
||||
IsActiveOnStart = false
|
||||
|
||||
[node name="Player" parent="." index="17" unique_id=1309399929]
|
||||
[node name="Player" parent="." index="18" unique_id=1309399929]
|
||||
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 2, 1.5, 9.5)
|
||||
|
||||
@@ -8,6 +8,7 @@ using Gamesmiths.Forge.Core;
|
||||
using Gamesmiths.Forge.Cues;
|
||||
using Gamesmiths.Forge.Effects;
|
||||
using Gamesmiths.Forge.Events;
|
||||
using Gamesmiths.Forge.Godot.Resources;
|
||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||
using Gamesmiths.Forge.Statescript;
|
||||
using Gamesmiths.Forge.Tags;
|
||||
@@ -44,7 +45,6 @@ public partial class Enemy : CharacterBody3D,
|
||||
// Public export components
|
||||
[Export]
|
||||
public Node3D? Target { get; set; }
|
||||
[Export] public required ForgeAbilityData HitAbility { get; set; }
|
||||
[Export]
|
||||
public float EnemyHeight { get; set; } = 1f;
|
||||
[Export]
|
||||
@@ -108,7 +108,6 @@ public partial class Enemy : CharacterBody3D,
|
||||
public void OnReady()
|
||||
{
|
||||
Init();
|
||||
SetupSignals();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
@@ -117,8 +116,6 @@ public partial class Enemy : CharacterBody3D,
|
||||
CMovement.RMovement = RMovement;
|
||||
CKnockback = GetNode<Node>("CKnockback") as IKnockbackable ?? throw new Exception("Knockback component not found");
|
||||
CKnockback.RKnockback = RKnockback;
|
||||
|
||||
_hitAbilityHandle = Abilities.GrantAbilityPermanently(HitAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
@@ -127,11 +124,23 @@ public partial class Enemy : CharacterBody3D,
|
||||
HealthBarWrapper.ResourceBar.Init(healthAttribute);
|
||||
healthAttribute.OnValueChanged += OnHealthChanged;
|
||||
|
||||
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"),
|
||||
data => {GD.Print("Hit!");});
|
||||
// Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"), data => {GD.Print("Hit!");});
|
||||
Events.Subscribe<DamageDone>(Tag.RequestTag(TagsManager, "events.combat.damage"), OnDamageReceived);
|
||||
Events.Subscribe<KnockbackDone>(Tag.RequestTag(TagsManager, "events.combat.knockback_received"), OnKnockbackReceived);
|
||||
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.death"), OnDeath);
|
||||
Events.Subscribe(Tag.RequestTag(TagsManager, "events.enemy.request_projectile"), ProjectileTokenRequested);
|
||||
|
||||
}
|
||||
|
||||
private void ProjectileTokenRequested(EventData obj)
|
||||
{
|
||||
// TODO: replace with token manager
|
||||
Events.Raise(new EventData
|
||||
{
|
||||
EventTags = Tag.RequestTag(TagsManager, "events.enemy.launch_projectile").GetSingleTagContainer()!,
|
||||
Source = this,
|
||||
Target = Target as IForgeEntity
|
||||
});
|
||||
}
|
||||
|
||||
public void OnKnockbackReceived(EventData<KnockbackDone> data)
|
||||
@@ -139,10 +148,6 @@ public partial class Enemy : CharacterBody3D,
|
||||
RegisterKnockback(new KnockbackRecord(data.Payload.knockbackDirection, data.EventMagnitude));
|
||||
}
|
||||
|
||||
public void SetupSignals()
|
||||
{
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
// Only trigger gameplay related effects on specific frames
|
||||
@@ -165,16 +170,18 @@ public partial class Enemy : CharacterBody3D,
|
||||
|
||||
public void ProcessGameplay(double delta)
|
||||
{
|
||||
if (_hitAbilityHandle == null) return;
|
||||
// if (_hitAbilityHandle == null) return;
|
||||
|
||||
var bodies = DamageBox.GetOverlappingBodies();
|
||||
foreach (var body in bodies)
|
||||
{
|
||||
if (body is not IForgeEntity forgeEntity) continue;
|
||||
var canActivate = _hitAbilityHandle.CanActivate(out var _);
|
||||
if (!canActivate) return;
|
||||
|
||||
_hitAbilityHandle.Activate(out var _, forgeEntity);
|
||||
Events.Raise(new EventData
|
||||
{
|
||||
EventTags = Tag.RequestTag(TagsManager, "events.enemy.try_hit").GetSingleTagContainer()!,
|
||||
Source = this,
|
||||
Target = forgeEntity
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,13 @@
|
||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="8_46wn3"]
|
||||
[ext_resource type="Resource" uid="uid://bocsykxbh8l0g" path="res://forge/resources/tag_containers/enemy_base_tags.tres" id="8_oj1ws"]
|
||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="8_on7rt"]
|
||||
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_46wn3"]
|
||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_dejyg"]
|
||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="10_oj1ws"]
|
||||
[ext_resource type="Resource" uid="uid://dt7a1io5o0b8s" path="res://scenes/enemies/flying_enemy/flying_enemy_knockback.tres" id="11_mpa2u"]
|
||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="11_vfi88"]
|
||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="12_hf6k8"]
|
||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="13_m4ble"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_wxisp"]
|
||||
script = ExtResource("8_46wn3")
|
||||
@@ -25,7 +30,41 @@ Default = 1
|
||||
Min = 1
|
||||
Max = 100
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ykkxn"]
|
||||
[sub_resource type="Resource" id="Resource_t0vud"]
|
||||
script = ExtResource("10_oj1ws")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ecuuy"]
|
||||
script = ExtResource("11_vfi88")
|
||||
AbilityData = ExtResource("2_46wn3")
|
||||
AbilityLevel = SubResource("Resource_t0vud")
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sk2ji"]
|
||||
script = ExtResource("12_hf6k8")
|
||||
GrantAbilityConfigs = [SubResource("Resource_ecuuy")]
|
||||
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_8x1id"]
|
||||
script = ExtResource("10_oj1ws")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_66opa"]
|
||||
script = ExtResource("10_oj1ws")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7y1tn"]
|
||||
script = ExtResource("13_m4ble")
|
||||
Name = "GrantAbilities"
|
||||
Modifiers = []
|
||||
Components = Array[Object]([SubResource("Resource_sk2ji")])
|
||||
Executions = []
|
||||
StackLimit = SubResource("Resource_66opa")
|
||||
InitialStack = SubResource("Resource_8x1id")
|
||||
Cues = []
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_4oy82"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_on7rt"]
|
||||
@@ -57,7 +96,6 @@ collision_layer = 16
|
||||
collision_mask = 273
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_q8l7o")
|
||||
HitAbility = ExtResource("2_46wn3")
|
||||
EnemyHeight = 0.5
|
||||
RKnockback = ExtResource("11_mpa2u")
|
||||
RMovement = ExtResource("4_dejyg")
|
||||
@@ -96,9 +134,14 @@ InitialAttributeValues = Dictionary[String, ExtResource("8_46wn3")]({
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="GrantEffect" type="Node" parent="ForgeEntityNode" unique_id=169684942]
|
||||
script = ExtResource("9_46wn3")
|
||||
EffectData = SubResource("Resource_7y1tn")
|
||||
metadata/_custom_type_script = "uid://dps0oef50noil"
|
||||
|
||||
[node name="CHealthBar" parent="." unique_id=1635725931 instance=ExtResource("7_ykkxn")]
|
||||
transform = Transform3D(0.3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.70000005, 0)
|
||||
texture = SubResource("ViewportTexture_ykkxn")
|
||||
texture = SubResource("ViewportTexture_4oy82")
|
||||
|
||||
[node name="CMovement" parent="." unique_id=1699571730 instance=ExtResource("7_vaeds")]
|
||||
RMovement = SubResource("Resource_on7rt")
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="RDamage" format=3 uid="uid://dgo65k2ceqfvy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="1_h6law"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_h6law")
|
||||
DamageDealt = 1.0
|
||||
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||
@@ -1,8 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="RHealth" format=3 uid="uid://dg1xbjhyhgnnk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="1_jht15"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_jht15")
|
||||
StartingHealth = 5.0
|
||||
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||
@@ -10,8 +10,13 @@
|
||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="7_x50ya"]
|
||||
[ext_resource type="Resource" uid="uid://bocsykxbh8l0g" path="res://forge/resources/tag_containers/enemy_base_tags.tres" id="8_4jf2q"]
|
||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="8_6d4gl"]
|
||||
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_4jf2q"]
|
||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_jqqi6"]
|
||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="10_ub34u"]
|
||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="11_0mf3g"]
|
||||
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="11_8k3xb"]
|
||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="12_v6xmd"]
|
||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="13_jryek"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x50ya"]
|
||||
script = ExtResource("7_x50ya")
|
||||
@@ -25,7 +30,41 @@ Default = 1
|
||||
Min = 1
|
||||
Max = 100
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_18xwy"]
|
||||
[sub_resource type="Resource" id="Resource_msmv1"]
|
||||
script = ExtResource("10_ub34u")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_m0osh"]
|
||||
script = ExtResource("11_0mf3g")
|
||||
AbilityData = ExtResource("6_4jf2q")
|
||||
AbilityLevel = SubResource("Resource_msmv1")
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_3gkmr"]
|
||||
script = ExtResource("12_v6xmd")
|
||||
GrantAbilityConfigs = [SubResource("Resource_m0osh")]
|
||||
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_oo2a1"]
|
||||
script = ExtResource("10_ub34u")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_q86ag"]
|
||||
script = ExtResource("10_ub34u")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5eesh"]
|
||||
script = ExtResource("13_jryek")
|
||||
Name = "Grant abilities"
|
||||
Modifiers = null
|
||||
Components = Array[Object]([SubResource("Resource_3gkmr")])
|
||||
Executions = null
|
||||
StackLimit = SubResource("Resource_q86ag")
|
||||
InitialStack = SubResource("Resource_oo2a1")
|
||||
Cues = null
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5lf6m"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6d4gl"]
|
||||
@@ -95,9 +134,14 @@ InitialAttributeValues = Dictionary[String, ExtResource("7_x50ya")]({
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="GrantEffect" type="Node" parent="ForgeEntityNode" unique_id=462009360]
|
||||
script = ExtResource("9_4jf2q")
|
||||
EffectData = SubResource("Resource_5eesh")
|
||||
metadata/_custom_type_script = "uid://dps0oef50noil"
|
||||
|
||||
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("7_18xwy")]
|
||||
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
||||
texture = SubResource("ViewportTexture_18xwy")
|
||||
texture = SubResource("ViewportTexture_5lf6m")
|
||||
|
||||
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
|
||||
RMovement = SubResource("Resource_6d4gl")
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="RDamage" format=3 uid="uid://otfc2snh8umc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="1_y415a"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_y415a")
|
||||
DamageDealt = 2.0
|
||||
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||
@@ -1,8 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="RHealth" format=3 uid="uid://bohbojc68j7y1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="1_h6jgd"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_h6jgd")
|
||||
StartingHealth = 20.0
|
||||
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||
299
scenes/enemies/projectile_enemy/projectile_enemy.tscn
Normal file
299
scenes/enemies/projectile_enemy/projectile_enemy.tscn
Normal file
@@ -0,0 +1,299 @@
|
||||
[gd_scene format=3 uid="uid://dx3y8sjftqk8f"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_ha67n"]
|
||||
[ext_resource type="Resource" uid="uid://qpdw62ubaclc" path="res://forge/resources/ability_datas/grounded_enemy_hit.tres" id="2_nbf6l"]
|
||||
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="3_gciy3"]
|
||||
[ext_resource type="Resource" uid="uid://c3ys18t0tkbq8" path="res://scenes/enemies/projectile_enemy/projectile_enemy_knockback.tres" id="3_ymgar"]
|
||||
[ext_resource type="Resource" uid="uid://rchgikroifmg" path="res://scenes/enemies/projectile_enemy/projectile_enemy_movement.tres" id="4_0f52b"]
|
||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="5_ya0fp"]
|
||||
[ext_resource type="Resource" uid="uid://bocsykxbh8l0g" path="res://forge/resources/tag_containers/enemy_base_tags.tres" id="6_ttkdf"]
|
||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="7_2triq"]
|
||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="8_ti0v2"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwx2um43k0ou4" path="res://scenes/components/health/CHealthbar.tscn" id="9_6ew2r"]
|
||||
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_xdj1j"]
|
||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="10_b62xo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dbr7ioio158ew" path="res://scenes/components/movement/CGroundedMovement.tscn" id="10_d3cra"]
|
||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="11_f6vvi"]
|
||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="11_fi4yv"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhp6qunnwhncf" path="res://scenes/projectile/Projectile.tscn" id="12_5ac6t"]
|
||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="12_7k8no"]
|
||||
[ext_resource type="Texture2D" uid="uid://g0u88alm6hcb" path="res://assets/ui/IconGodotNode/node/icon_bullet.png" id="12_rlvdp"]
|
||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="12_ssnfc"]
|
||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="13_5ac6t"]
|
||||
[ext_resource type="Script" uid="uid://dxtjifb8hv8k4" path="res://forge/abilities/ForgeSpawnProjectileBehavior.cs" id="13_rlvdp"]
|
||||
[ext_resource type="Resource" uid="uid://bkr1xfokymvp4" path="res://forge/resources/tag_containers/on_enemy_lauch_project.tres" id="13_ssnfc"]
|
||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="14_rlvdp"]
|
||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="17_xabdf"]
|
||||
[ext_resource type="Script" uid="uid://br7ut4lbau66w" path="res://forge/calculators/ForgeRaiseEventTagExecution.cs" id="18_ufku3"]
|
||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="19_hgi6f"]
|
||||
[ext_resource type="Script" uid="uid://cl5hudinl1rex" path="res://forge/abilities/ForgeEffectApplicationBehavior.cs" id="21_17f1o"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x50ya"]
|
||||
script = ExtResource("8_ti0v2")
|
||||
Default = 1
|
||||
Min = 1
|
||||
Max = 100
|
||||
|
||||
[sub_resource type="Resource" id="Resource_yk4hc"]
|
||||
script = ExtResource("8_ti0v2")
|
||||
Default = 1
|
||||
Min = 1
|
||||
Max = 100
|
||||
|
||||
[sub_resource type="Resource" id="Resource_55uge"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xabdf"]
|
||||
script = ExtResource("12_ssnfc")
|
||||
AbilityData = ExtResource("2_nbf6l")
|
||||
AbilityLevel = SubResource("Resource_55uge")
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_idpl5"]
|
||||
script = ExtResource("13_rlvdp")
|
||||
Projectile = ExtResource("12_5ac6t")
|
||||
Name = "Spawn projectile"
|
||||
Icon = ExtResource("12_rlvdp")
|
||||
metadata/_custom_type_script = "uid://dxtjifb8hv8k4"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5ac6t"]
|
||||
script = ExtResource("10_b62xo")
|
||||
Name = "Launch projectile"
|
||||
CooldownEffects = []
|
||||
AbilityBehavior = SubResource("Resource_idpl5")
|
||||
TriggerSource = 1
|
||||
TriggerTag = ExtResource("13_ssnfc")
|
||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rlvdp"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ei7hs"]
|
||||
script = ExtResource("12_ssnfc")
|
||||
AbilityData = SubResource("Resource_5ac6t")
|
||||
AbilityLevel = SubResource("Resource_rlvdp")
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5xe4r"]
|
||||
script = ExtResource("17_xabdf")
|
||||
ContainerTags = Array[String](["events.enemy.request_projectile"])
|
||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5hctm"]
|
||||
script = ExtResource("18_ufku3")
|
||||
EventTags = SubResource("Resource_5xe4r")
|
||||
metadata/_custom_type_script = "uid://br7ut4lbau66w"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xq5v1"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_s7hsu"]
|
||||
script = ExtResource("19_hgi6f")
|
||||
BaseValue = 1.0
|
||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xuuuu"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nr327"]
|
||||
script = ExtResource("14_rlvdp")
|
||||
Name = "Raise request projectile event periodically"
|
||||
Modifiers = []
|
||||
Components = []
|
||||
Executions = Array[Object]([SubResource("Resource_5hctm")])
|
||||
DurationType = 1
|
||||
HasPeriodicApplication = true
|
||||
Period = SubResource("Resource_s7hsu")
|
||||
StackLimit = SubResource("Resource_xuuuu")
|
||||
InitialStack = SubResource("Resource_xq5v1")
|
||||
Cues = []
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ov8t2"]
|
||||
script = ExtResource("21_17f1o")
|
||||
EffectData = SubResource("Resource_nr327")
|
||||
metadata/_custom_type_script = "uid://cl5hudinl1rex"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gg1oy"]
|
||||
script = ExtResource("10_b62xo")
|
||||
Name = "Request projectile token event raise"
|
||||
CooldownEffects = []
|
||||
AbilityBehavior = SubResource("Resource_ov8t2")
|
||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_r40oc"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nu2lf"]
|
||||
script = ExtResource("12_ssnfc")
|
||||
AbilityData = SubResource("Resource_gg1oy")
|
||||
AbilityLevel = SubResource("Resource_r40oc")
|
||||
TryActivateOnGrant = true
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ufku3"]
|
||||
script = ExtResource("13_5ac6t")
|
||||
GrantAbilityConfigs = [SubResource("Resource_xabdf"), SubResource("Resource_ei7hs"), SubResource("Resource_nu2lf")]
|
||||
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hgi6f"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_17f1o"]
|
||||
script = ExtResource("11_f6vvi")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ytrix"]
|
||||
script = ExtResource("14_rlvdp")
|
||||
Name = "Grant abilities"
|
||||
Modifiers = []
|
||||
Components = Array[Object]([SubResource("Resource_ufku3")])
|
||||
Executions = []
|
||||
StackLimit = SubResource("Resource_17f1o")
|
||||
InitialStack = SubResource("Resource_hgi6f")
|
||||
Cues = []
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_f6vvi"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6d4gl"]
|
||||
script = ExtResource("11_fi4yv")
|
||||
Speed = 5.0
|
||||
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_62kkh"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3kqd1"]
|
||||
albedo_color = Color(0.9888099, 0.33454797, 0.39278528, 1)
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_3uydm"]
|
||||
material = SubResource("StandardMaterial3D_3kqd1")
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_4yfjf"]
|
||||
radius = 0.05
|
||||
height = 0.1
|
||||
radial_segments = 4
|
||||
rings = 4
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4yfjf"]
|
||||
albedo_color = Color(0.06469653, 0.06469653, 0.06469653, 1)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_4yfjf"]
|
||||
size = Vector3(1, 2, 1.5)
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_k2cew"]
|
||||
radius = 2.0
|
||||
|
||||
[node name="ProjectileEnemy" type="CharacterBody3D" unique_id=1747444936]
|
||||
collision_layer = 16
|
||||
collision_mask = 273
|
||||
script = ExtResource("1_ha67n")
|
||||
EnemyHeight = 2.0
|
||||
RKnockback = ExtResource("3_ymgar")
|
||||
RMovement = ExtResource("4_0f52b")
|
||||
|
||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
|
||||
script = ExtResource("5_ya0fp")
|
||||
BaseTags = ExtResource("6_ttkdf")
|
||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||
|
||||
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
|
||||
script = ExtResource("7_2triq")
|
||||
AttributeSetClass = "CharacterAttributeSet"
|
||||
InitialAttributeValues = Dictionary[String, ExtResource("8_ti0v2")]({
|
||||
"Health": Object(RefCounted,"script":ExtResource("8_ti0v2"),"Default":100,"Min":0,"Max":100)
|
||||
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="MetaAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1794036161]
|
||||
script = ExtResource("7_2triq")
|
||||
AttributeSetClass = "MetaAttributeSet"
|
||||
InitialAttributeValues = Dictionary[String, ExtResource("8_ti0v2")]({
|
||||
"IncomingDamage": Object(RefCounted,"script":ExtResource("8_ti0v2"),"Default":0,"Min":0,"Max":1000)
|
||||
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="EnnemyAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=804252284]
|
||||
script = ExtResource("7_2triq")
|
||||
AttributeSetClass = "EnemyAttributeSet"
|
||||
InitialAttributeValues = Dictionary[String, ExtResource("8_ti0v2")]({
|
||||
"Health": Object(RefCounted,"script":ExtResource("8_ti0v2"),"Default":100,"Min":0,"Max":100)
|
||||
,
|
||||
"Speed": SubResource("Resource_x50ya"),
|
||||
"Strength": SubResource("Resource_yk4hc")
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="ForgeEffect" type="Node" parent="ForgeEntityNode" unique_id=401970791]
|
||||
script = ExtResource("9_xdj1j")
|
||||
EffectData = SubResource("Resource_ytrix")
|
||||
metadata/_custom_type_script = "uid://dps0oef50noil"
|
||||
|
||||
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("9_6ew2r")]
|
||||
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
||||
texture = SubResource("ViewportTexture_f6vvi")
|
||||
|
||||
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("10_d3cra")]
|
||||
RMovement = SubResource("Resource_6d4gl")
|
||||
WallInFrontRayCast = NodePath("../WallInFrontRayCast")
|
||||
|
||||
[node name="CKnockback" parent="." unique_id=1769689477 instance=ExtResource("12_7k8no")]
|
||||
RKnockback = ExtResource("3_gciy3")
|
||||
|
||||
[node name="CTarget" type="Marker3D" parent="." unique_id=383414478]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=237956006]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_62kkh")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1261225229]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
layers = 33
|
||||
mesh = SubResource("CapsuleMesh_3uydm")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="." unique_id=934245732]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.2, 1.5, -0.5)
|
||||
layers = 33
|
||||
cast_shadow = 0
|
||||
ignore_occlusion_culling = true
|
||||
mesh = SubResource("SphereMesh_4yfjf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
|
||||
|
||||
[node name="MeshInstance3D3" type="MeshInstance3D" parent="." unique_id=1877433806]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 1.5, -0.5)
|
||||
layers = 33
|
||||
cast_shadow = 0
|
||||
ignore_occlusion_culling = true
|
||||
mesh = SubResource("SphereMesh_4yfjf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
|
||||
|
||||
[node name="WallInFrontRayCast" type="RayCast3D" parent="." unique_id=834403687]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
|
||||
target_position = Vector3(0, 0, -1.5)
|
||||
collision_mask = 272
|
||||
|
||||
[node name="DamageBox" type="Area3D" parent="." unique_id=399872344]
|
||||
collision_layer = 0
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DamageBox" unique_id=978720734]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -0.25)
|
||||
shape = SubResource("BoxShape3D_4yfjf")
|
||||
|
||||
[node name="AimAssistTarget" type="Area3D" parent="." unique_id=328174571]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
collision_layer = 64
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="AimAssistTarget" unique_id=1960476920]
|
||||
shape = SubResource("SphereShape3D_k2cew")
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="RKnockback" format=3 uid="uid://c3ys18t0tkbq8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="1_5r2lx"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_5r2lx")
|
||||
Modifier = 1.0
|
||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="RMovement" format=3 uid="uid://rchgikroifmg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="1_vkids"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vkids")
|
||||
GravityModifier = 5.0
|
||||
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
|
||||
@@ -92,9 +92,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
||||
public Tag WeaponFlyingStatusTag;
|
||||
public Tag WeaponPlantedStatusTag;
|
||||
|
||||
public Tag WeaponFlyingAbilityTag;
|
||||
public Tag WeaponPlantedAbilityTag;
|
||||
|
||||
private AbilityHandle? _weaponFlyingAbility;
|
||||
private AbilityHandle? _weaponPlantedAbility;
|
||||
|
||||
@@ -235,13 +232,11 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
||||
// Manage weapon tick raising abilities
|
||||
if (FlyingTickAbility != null)
|
||||
{
|
||||
WeaponFlyingAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.flying");
|
||||
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
|
||||
}
|
||||
if (PlantedTickAbility != null)
|
||||
{
|
||||
WeaponPlantedAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.planted");
|
||||
_weaponPlantedAbility = Abilities.GrantAbilityPermanently(PlantedTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||
Events.Subscribe(WeaponUnplantedEventTag, _ => { _weaponPlantedAbility.Cancel(); });
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://ckm3d6k08a72u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
|
||||
[ext_resource type="Resource" uid="uid://dgjsi1my7nlnk" path="res://forge/resources/ability_datas/player_hit.tres" id="2_2wsgo"]
|
||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_l1xlx"]
|
||||
[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"]
|
||||
@@ -23,9 +22,9 @@
|
||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="14_i0jsb"]
|
||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="15_a8u16"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7bruw"]
|
||||
[sub_resource type="Resource" id="Resource_rgbou"]
|
||||
script = ExtResource("2_l1xlx")
|
||||
ContainerTags = Array[String](["weapon"])
|
||||
ContainerTags = Array[String](["objects.weapon"])
|
||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pgbtr"]
|
||||
@@ -125,13 +124,12 @@ continuous_cd = true
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 1
|
||||
script = ExtResource("1_csqwk")
|
||||
OnPlantedInEnemy = ExtResource("2_2wsgo")
|
||||
FlyingTickAbility = ExtResource("4_7bruw")
|
||||
PlantedTickAbility = ExtResource("3_7bruw")
|
||||
|
||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
|
||||
script = ExtResource("5_7bruw")
|
||||
BaseTags = SubResource("Resource_7bruw")
|
||||
BaseTags = SubResource("Resource_rgbou")
|
||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||
|
||||
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]
|
||||
|
||||
@@ -670,8 +670,8 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
|
||||
// Forge events
|
||||
HealthAttribute.OnValueChanged += OnHealthChanged;
|
||||
|
||||
var weaponLeftToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
|
||||
var weaponLandedToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
|
||||
// var weaponLeftToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
|
||||
// var weaponLandedToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
|
||||
}
|
||||
|
||||
#region LifecycleManagement
|
||||
|
||||
124
scenes/projectile/Projectile.cs
Normal file
124
scenes/projectile/Projectile.cs
Normal file
@@ -0,0 +1,124 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Gamesmiths.Forge.Abilities;
|
||||
using Gamesmiths.Forge.Core;
|
||||
using Gamesmiths.Forge.Cues;
|
||||
using Gamesmiths.Forge.Effects;
|
||||
using Gamesmiths.Forge.Events;
|
||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||
using Gamesmiths.Forge.Statescript;
|
||||
using Gamesmiths.Forge.Tags;
|
||||
using Movementtests.interfaces;
|
||||
using Movementtests.tools;
|
||||
using Node = Godot.Node;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_bullet.png"), Meta(typeof(IAutoNode))]
|
||||
public partial class Projectile : RigidBody3D, IForgeEntity, ITargetable, IKillable, ISpawnable
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
#region Dependencies
|
||||
|
||||
[Dependency]
|
||||
public TagsManager TagsManager => this.DependOn<TagsManager>();
|
||||
[Dependency]
|
||||
public CuesManager CuesManager => this.DependOn<CuesManager>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region IForgeEntity
|
||||
|
||||
// Perfectly forward the IForgeEntity interface to the ForgeEntity component
|
||||
public EntityAttributes Attributes
|
||||
{
|
||||
get => ForgeEntity.Attributes;
|
||||
set => ForgeEntity.Attributes = value;
|
||||
}
|
||||
public EntityTags Tags
|
||||
{
|
||||
get => ForgeEntity.Tags;
|
||||
set => ForgeEntity.Tags = value;
|
||||
}
|
||||
public EffectsManager EffectsManager
|
||||
{
|
||||
get => ForgeEntity.EffectsManager;
|
||||
set => ForgeEntity.EffectsManager = value;
|
||||
}
|
||||
public EntityAbilities Abilities
|
||||
{
|
||||
get => ForgeEntity.Abilities;
|
||||
set => ForgeEntity.Abilities = value;
|
||||
}
|
||||
public EventManager Events
|
||||
{
|
||||
get => ForgeEntity.Events;
|
||||
set => ForgeEntity.Events = value;
|
||||
}
|
||||
|
||||
public Variables SharedVariables
|
||||
{
|
||||
get => ForgeEntity.SharedVariables;
|
||||
set => ForgeEntity.SharedVariables = value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[Node("ForgeEntityNode")] public required ForgeEntityNode ForgeEntity { get; set;}
|
||||
|
||||
[Export] public float Damage = 10f;
|
||||
|
||||
public Node3D Target { get; set; }
|
||||
|
||||
public void Init()
|
||||
{
|
||||
ApplyCentralImpulse(Vector3.Up * 10);
|
||||
}
|
||||
|
||||
public override void _IntegrateForces(PhysicsDirectBodyState3D state)
|
||||
{
|
||||
var direction = GlobalPosition.DirectionTo(Target.GlobalPosition);
|
||||
state.LinearVelocity += direction / 10.0f;
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
BodyEntered += OnProjectileHit;
|
||||
|
||||
// Events.Subscribe(Tag.RequestTag(TagsManager, "events.weapon.flyingtick"), data => { GD.Print("tick"); });
|
||||
}
|
||||
|
||||
private void OnProjectileHit(Node body)
|
||||
{
|
||||
if (body is IForgeEntity entity)
|
||||
{
|
||||
Events.Raise(new EventData
|
||||
{
|
||||
EventTags = Tag.RequestTag(TagsManager, "events.combat.hit").GetSingleTagContainer()!,
|
||||
Source = this,
|
||||
Target = entity,
|
||||
EventMagnitude = Damage
|
||||
});
|
||||
}
|
||||
|
||||
Events.Raise(new EventData
|
||||
{
|
||||
EventTags = Tag.RequestTag(TagsManager, "events.weapon.planted").GetSingleTagContainer()!,
|
||||
Source = this,
|
||||
EventMagnitude = Damage
|
||||
});
|
||||
|
||||
Kill();
|
||||
}
|
||||
|
||||
public Vector3 GetTargetGlobalPosition()
|
||||
{
|
||||
return GlobalPosition;
|
||||
}
|
||||
|
||||
public void Kill()
|
||||
{
|
||||
QueueFree(); // If thrown offmap
|
||||
}
|
||||
}
|
||||
1
scenes/projectile/Projectile.cs.uid
Normal file
1
scenes/projectile/Projectile.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bmpfvyccbou3b
|
||||
236
scenes/projectile/Projectile.tscn
Normal file
236
scenes/projectile/Projectile.tscn
Normal file
@@ -0,0 +1,236 @@
|
||||
[gd_scene format=3 uid="uid://bhp6qunnwhncf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bmpfvyccbou3b" path="res://scenes/projectile/Projectile.cs" id="1_bwggc"]
|
||||
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://forge/resources/ability_datas/weapon_flying_tick_ability.tres" id="2_gxghe"]
|
||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="3_0m0gv"]
|
||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_8gwhl"]
|
||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_bwggc"]
|
||||
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="6_j80uc"]
|
||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="7_hwhpw"]
|
||||
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="7_ufml1"]
|
||||
[ext_resource type="Resource" uid="uid://sn6kndc6ukic" path="res://forge/resources/tag_containers/on_damage_dealt.tres" id="8_4opcx"]
|
||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="8_eb14h"]
|
||||
[ext_resource type="Resource" uid="uid://5tr54q0rdpho" path="res://forge/resources/tag_containers/on_damage_taken.tres" id="9_0m0gv"]
|
||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="9_ah28r"]
|
||||
[ext_resource type="Script" uid="uid://cfx62w40nd84v" path="res://forge/calculators/ForgeDamageExecution.cs" id="10_gxghe"]
|
||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="10_mss85"]
|
||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="11_aepsp"]
|
||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="12_6slh1"]
|
||||
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="13_nh3w7"]
|
||||
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="15_7ctk5"]
|
||||
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="16_4opcx"]
|
||||
[ext_resource type="Script" uid="uid://bnee6amtc2bhj" path="res://forge/abilities/ForgeExplodingSwordBehavior.cs" id="19_0m0gv"]
|
||||
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="19_gxghe"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_n3xfy"]
|
||||
script = ExtResource("10_gxghe")
|
||||
DamageType = 1
|
||||
DamageDealerEventTags = ExtResource("8_4opcx")
|
||||
DamageReceiverEventTags = ExtResource("9_0m0gv")
|
||||
metadata/_custom_type_script = "uid://cfx62w40nd84v"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5se5x"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tsnac"]
|
||||
script = ExtResource("12_6slh1")
|
||||
BaseValue = 1.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4tmlu"]
|
||||
script = ExtResource("12_6slh1")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nsq4o"]
|
||||
script = ExtResource("12_6slh1")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_wvq73"]
|
||||
script = ExtResource("12_6slh1")
|
||||
BaseValue = 1.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ocyfe"]
|
||||
script = ExtResource("12_6slh1")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_idlka"]
|
||||
script = ExtResource("12_6slh1")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_uh7hr"]
|
||||
script = ExtResource("12_6slh1")
|
||||
BaseValue = 10.0
|
||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ckp55"]
|
||||
script = ExtResource("13_nh3w7")
|
||||
Attribute = "MetaAttributeSet.IncomingDamage"
|
||||
Operation = 2
|
||||
ScalableFloat = SubResource("Resource_uh7hr")
|
||||
Coefficient = SubResource("Resource_wvq73")
|
||||
PreMultiplyAdditiveValue = SubResource("Resource_idlka")
|
||||
PostMultiplyAdditiveValue = SubResource("Resource_ocyfe")
|
||||
CalculatorCoefficient = SubResource("Resource_tsnac")
|
||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_nsq4o")
|
||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_4tmlu")
|
||||
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_yl520"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1kwc2"]
|
||||
script = ExtResource("11_aepsp")
|
||||
Name = "Projectile damate"
|
||||
Modifiers = Array[Object]([SubResource("Resource_ckp55")])
|
||||
Components = Array[Object]([ExtResource("7_ufml1")])
|
||||
Executions = Array[Object]([SubResource("Resource_n3xfy")])
|
||||
StackLimit = SubResource("Resource_yl520")
|
||||
InitialStack = SubResource("Resource_5se5x")
|
||||
Cues = []
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_3icyc"]
|
||||
script = ExtResource("15_7ctk5")
|
||||
DamageEffect = SubResource("Resource_1kwc2")
|
||||
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7ctk5"]
|
||||
script = ExtResource("16_4opcx")
|
||||
Tag = "events.combat.hit"
|
||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_iburv"]
|
||||
script = ExtResource("7_hwhpw")
|
||||
Name = "On player hit"
|
||||
CooldownEffects = []
|
||||
AbilityBehavior = SubResource("Resource_3icyc")
|
||||
TriggerSource = 1
|
||||
TriggerTag = SubResource("Resource_7ctk5")
|
||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ufml1"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4opcx"]
|
||||
script = ExtResource("9_ah28r")
|
||||
AbilityData = SubResource("Resource_iburv")
|
||||
AbilityLevel = SubResource("Resource_ufml1")
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_uhv33"]
|
||||
script = ExtResource("19_0m0gv")
|
||||
Explosion = ExtResource("19_gxghe")
|
||||
Radius = 10.0
|
||||
metadata/_custom_type_script = "uid://bnee6amtc2bhj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hnbha"]
|
||||
script = ExtResource("16_4opcx")
|
||||
Tag = "events.weapon.planted"
|
||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ynqlf"]
|
||||
script = ExtResource("7_hwhpw")
|
||||
Name = "Explode on contact"
|
||||
CooldownEffects = []
|
||||
AbilityBehavior = SubResource("Resource_uhv33")
|
||||
TriggerSource = 1
|
||||
TriggerTag = SubResource("Resource_hnbha")
|
||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ltce2"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xxtl1"]
|
||||
script = ExtResource("9_ah28r")
|
||||
AbilityData = SubResource("Resource_ynqlf")
|
||||
AbilityLevel = SubResource("Resource_ltce2")
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_h6udq"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_k64oi"]
|
||||
script = ExtResource("9_ah28r")
|
||||
AbilityData = ExtResource("2_gxghe")
|
||||
AbilityLevel = SubResource("Resource_h6udq")
|
||||
TryActivateOnGrant = true
|
||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0m0gv"]
|
||||
script = ExtResource("10_mss85")
|
||||
GrantAbilityConfigs = [SubResource("Resource_4opcx"), SubResource("Resource_xxtl1"), SubResource("Resource_k64oi")]
|
||||
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gxghe"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6slh1"]
|
||||
script = ExtResource("8_eb14h")
|
||||
BaseValue = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nh3w7"]
|
||||
script = ExtResource("11_aepsp")
|
||||
Name = "Grant abilities"
|
||||
Modifiers = []
|
||||
Components = Array[Object]([SubResource("Resource_0m0gv")])
|
||||
Executions = []
|
||||
StackLimit = SubResource("Resource_6slh1")
|
||||
InitialStack = SubResource("Resource_gxghe")
|
||||
Cues = []
|
||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_16rri"]
|
||||
radius = 0.2
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bwggc"]
|
||||
albedo_color = Color(0.9999997, 0.34948558, 0.033228315, 1)
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_p7dfg"]
|
||||
material = SubResource("StandardMaterial3D_bwggc")
|
||||
radius = 0.4
|
||||
height = 0.8
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_p7dfg"]
|
||||
radius = 2.0
|
||||
|
||||
[node name="Projectile" type="RigidBody3D" unique_id=1536748036]
|
||||
collision_layer = 32
|
||||
collision_mask = 289
|
||||
continuous_cd = true
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 1
|
||||
script = ExtResource("1_bwggc")
|
||||
|
||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1961065393]
|
||||
script = ExtResource("3_0m0gv")
|
||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||
|
||||
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=100377985]
|
||||
script = ExtResource("3_8gwhl")
|
||||
AttributeSetClass = "MetaAttributeSet"
|
||||
InitialAttributeValues = Dictionary[String, ExtResource("4_bwggc")]({
|
||||
"IncomingDamage": Object(RefCounted,"script":ExtResource("4_bwggc"),"Default":0,"Min":0,"Max":1000)
|
||||
,
|
||||
"Level": Object(RefCounted,"script":ExtResource("4_bwggc"),"Default":1,"Min":1,"Max":1000)
|
||||
|
||||
})
|
||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||
|
||||
[node name="GrantAbilities" type="Node" parent="ForgeEntityNode" unique_id=699633438]
|
||||
script = ExtResource("6_j80uc")
|
||||
EffectData = SubResource("Resource_nh3w7")
|
||||
metadata/_custom_type_script = "uid://dps0oef50noil"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=2109664666]
|
||||
shape = SubResource("SphereShape3D_16rri")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=472918778]
|
||||
mesh = SubResource("SphereMesh_p7dfg")
|
||||
|
||||
[node name="AimAssistTarget" type="Area3D" parent="." unique_id=734689820]
|
||||
collision_layer = 64
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="AimAssistTarget" unique_id=1220912429]
|
||||
shape = SubResource("SphereShape3D_p7dfg")
|
||||
@@ -34,12 +34,12 @@ public partial class Spawner : Node3D
|
||||
|
||||
if (EnemyToSpawn.Instantiate() is not Enemy spawnedInstance) return;
|
||||
spawnedInstance.RequestReady();
|
||||
GetTree().GetCurrentScene().AddChild(spawnedInstance);
|
||||
spawnedInstance.GlobalPosition = GlobalPosition;
|
||||
|
||||
spawnedInstance.Target = Target;
|
||||
spawnedInstance.RMovement = MovementInputs;
|
||||
spawnedInstance.Init();
|
||||
|
||||
GetTree().GetCurrentScene().AddChild(spawnedInstance);
|
||||
spawnedInstance.GlobalPosition = GlobalPosition;
|
||||
}
|
||||
|
||||
public void StartSpawning()
|
||||
|
||||
Reference in New Issue
Block a user