Compare commits

...

3 Commits

Author SHA1 Message Date
7ba4a3db3f fixed a few issues
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 30s
Create tag and build when new code gets to main / Export (push) Successful in 6m0s
2026-05-06 16:25:56 +02:00
bcc748ca6b More weapon events and abilities 2026-05-06 11:05:55 +02:00
1db30eafd9 removed obsolete references and maps, fixed menu hide pause issue 2026-05-05 17:04:09 +02:00
39 changed files with 550 additions and 2368 deletions

View File

@@ -32,7 +32,7 @@ func _exit_tree() -> void:
func close() -> void:
menu_closing.emit()
hide()
hide_menu()
queue_free()
func hide_menu() -> void:
@@ -74,7 +74,6 @@ func show_menu() -> void:
visible = true
func _enter_tree() -> void:
print("enter_tree")
show_menu()
back_action.triggered.connect(_handle_cancel_input)

View File

@@ -0,0 +1,35 @@
using Gamesmiths.Forge.Abilities;
using Gamesmiths.Forge.Effects;
using Gamesmiths.Forge.Godot.Resources;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Godot;
namespace Movementtests.forge.abilities;
public class ManualCancelHitBehavior(ForgeEffectData? damage) : IAbilityBehavior
{
public void OnStarted(AbilityBehaviorContext context)
{
if (context.Target == null || damage == null) return;
var sourceLocation = (context.Source as Node3D)?.GlobalPosition ?? Vector3.Zero;
var targetLocation = (context.Target as Node3D)?.GlobalPosition ?? Vector3.Zero;
var magnitude = context.Magnitude == 0 ? 1 : context.Magnitude;
var effect = new Effect(damage.GetEffectData(), new EffectOwnership(context.Owner, context.Owner));
context.Target.EffectsManager.ApplyEffect(effect, new SimpleHitEffectData(sourceLocation, targetLocation, magnitude));
}
public void OnEnded(AbilityBehaviorContext context)
{
context.AbilityHandle.CommitAbility();
}
}
[Tool]
[GlobalClass]
public partial class ForgeManualCancelHitBehavior : ForgeAbilityBehavior
{
[Export] public ForgeEffectData? DamageEffect { get; set; }
public override IAbilityBehavior GetBehavior() => new ManualCancelHitBehavior(DamageEffect);
}

View File

@@ -0,0 +1 @@
uid://d1bb1fvh1mnpd

View File

@@ -21,12 +21,12 @@ public class SimpleHitBehavior(ForgeEffectData? damage) : IAbilityBehavior
var effect = new Effect(damage.GetEffectData(), new EffectOwnership(context.Owner, context.Owner));
context.Target.EffectsManager.ApplyEffect(effect, new SimpleHitEffectData(sourceLocation, targetLocation, magnitude));
// context.InstanceHandle.End();
context.AbilityHandle.CommitAbility();
context.InstanceHandle.End();
}
public void OnEnded(AbilityBehaviorContext context)
{
context.AbilityHandle.CommitAbility();
}
}

View File

@@ -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"])
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"])

View File

@@ -26,7 +26,7 @@ metadata/_custom_type_script = "uid://cfx62w40nd84v"
[sub_resource type="Resource" id="Resource_ndb8p"]
script = ExtResource("5_tw4gc")
Modifier = 100.0
Modifier = 500.0
metadata/_custom_type_script = "uid://b44cse62qru7j"
[sub_resource type="Resource" id="Resource_dy671"]
@@ -57,7 +57,6 @@ BaseValue = 1.0
[sub_resource type="Resource" id="Resource_qqpg8"]
script = ExtResource("11_bs6rs")
BaseValue = 10.0
[sub_resource type="Resource" id="Resource_igmn0"]
script = ExtResource("11_bs6rs")
@@ -70,6 +69,7 @@ metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
[sub_resource type="Resource" id="Resource_xwtie"]
script = ExtResource("12_a6jts")
Attribute = "MetaAttributeSet.IncomingDamage"
Operation = 2
CalculationType = 1
ScalableFloat = SubResource("Resource_acqnn")
CapturedAttribute = "MetaAttributeSet.Level"
@@ -107,7 +107,6 @@ metadata/_custom_type_script = "uid://n6efm5o4uxvr"
[resource]
script = ExtResource("16_hhyju")
Name = "Explosion "
InstancingPolicy = 1
CooldownEffects = []
AbilityBehavior = SubResource("Resource_ba5lh")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"

View File

@@ -1,81 +1,20 @@
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://dgjsi1my7nlnk"]
[ext_resource type="Resource" uid="uid://bn1getr10b4dx" path="res://forge/resources/effect_datas/simple_player_hit.tres" id="1_c4wry"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="1_l0l1a"]
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="1_n2s8d"]
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="1_r7waw"]
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_w1wo0"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="2_5vjbv"]
[ext_resource type="Script" uid="uid://d1bb1fvh1mnpd" path="res://forge/abilities/ForgeManualCancelHitBehavior.cs" id="2_c4wry"]
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="2_jwyed"]
[ext_resource type="Resource" uid="uid://4rkwr10pc6tp" path="res://forge/resources/custom_executions/physical_damage_calculator.tres" id="2_l5emy"]
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="3_c4wry"]
[ext_resource type="Resource" uid="uid://cc1qrmbp12fk8" path="res://forge/resources/custom_executions/player_hit_knoback_calculation.tres" id="3_l5emy"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="3_w1wo0"]
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="4_c4wry"]
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="5_0cyim"]
[sub_resource type="Resource" id="Resource_0cyim"]
script = ExtResource("1_l0l1a")
BaseValue = 1
[sub_resource type="Resource" id="Resource_h8gc3"]
script = ExtResource("4_c4wry")
BaseValue = 1.0
[sub_resource type="Resource" id="Resource_ewmvj"]
script = ExtResource("4_c4wry")
[sub_resource type="Resource" id="Resource_8wvcn"]
script = ExtResource("4_c4wry")
[sub_resource type="Resource" id="Resource_no8t2"]
script = ExtResource("4_c4wry")
BaseValue = 1.0
[sub_resource type="Resource" id="Resource_vioyh"]
script = ExtResource("4_c4wry")
[sub_resource type="Resource" id="Resource_m6xnn"]
script = ExtResource("4_c4wry")
[sub_resource type="Resource" id="Resource_uinv8"]
script = ExtResource("4_c4wry")
BaseValue = 40.0
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
[sub_resource type="Resource" id="Resource_04hqa"]
script = ExtResource("3_c4wry")
Attribute = "MetaAttributeSet.IncomingDamage"
Operation = 2
ScalableFloat = SubResource("Resource_uinv8")
Coefficient = SubResource("Resource_no8t2")
PreMultiplyAdditiveValue = SubResource("Resource_m6xnn")
PostMultiplyAdditiveValue = SubResource("Resource_vioyh")
CalculatorCoefficient = SubResource("Resource_h8gc3")
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_8wvcn")
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_ewmvj")
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
[sub_resource type="Resource" id="Resource_8fbeq"]
script = ExtResource("1_l0l1a")
BaseValue = 1
[sub_resource type="Resource" id="Resource_ees2v"]
script = ExtResource("2_5vjbv")
Name = "Player Hit Effect"
Modifiers = Array[Object]([SubResource("Resource_04hqa")])
Components = Array[Object]([ExtResource("1_r7waw")])
Executions = Array[Object]([ExtResource("2_l5emy"), ExtResource("3_l5emy")])
StackLimit = SubResource("Resource_8fbeq")
InitialStack = SubResource("Resource_0cyim")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="Resource" id="Resource_r7waw"]
script = ExtResource("1_n2s8d")
DamageEffect = SubResource("Resource_ees2v")
Name = "PlayerHitEffect"
Description = "Effect applied to target on player hit"
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
script = ExtResource("2_c4wry")
DamageEffect = ExtResource("1_c4wry")
Name = "Player hit"
metadata/_custom_type_script = "uid://d1bb1fvh1mnpd"
[sub_resource type="Resource" id="Resource_qk2av"]
script = ExtResource("1_w1wo0")
@@ -154,6 +93,6 @@ script = ExtResource("3_w1wo0")
Name = "PlayerHitAbility"
RetriggerInstancedAbility = true
CooldownEffects = [SubResource("Resource_cmmfb")]
AbilityBehavior = SubResource("Resource_r7waw")
AbilityBehavior = SubResource("Resource_0cyim")
ActivationBlockedTags = SubResource("Resource_qk2av")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"

View File

@@ -0,0 +1,63 @@
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://0oo3na61ot1o"]
[ext_resource type="Resource" uid="uid://bk3rv5jrutfjw" path="res://forge/resources/tag_containers/on_weapon_plantedtick.tres" id="1_4dvtr"]
[ext_resource type="Script" uid="uid://br7ut4lbau66w" path="res://forge/calculators/ForgeRaiseEventTagExecution.cs" id="2_oo2u8"]
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="2_wolay"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="3_cykp3"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="3_mqsqr"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="4_4348y"]
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="4_oo2u8"]
[ext_resource type="Script" uid="uid://cl5hudinl1rex" path="res://forge/abilities/ForgeEffectApplicationBehavior.cs" id="5_drdls"]
[sub_resource type="Resource" id="Resource_l3tir"]
script = ExtResource("2_oo2u8")
EventTags = ExtResource("1_4dvtr")
metadata/_custom_type_script = "uid://br7ut4lbau66w"
[sub_resource type="Resource" id="Resource_yc0gp"]
script = ExtResource("3_cykp3")
BaseValue = 1
[sub_resource type="Resource" id="Resource_cykp3"]
script = ExtResource("4_oo2u8")
BaseValue = 0.5
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
[sub_resource type="Resource" id="Resource_rvogu"]
script = ExtResource("3_cykp3")
BaseValue = 1
[sub_resource type="Resource" id="Resource_hgeae"]
script = ExtResource("4_4348y")
Name = "Raise Planted Tick Periodically"
Modifiers = null
Components = null
Executions = Array[Object]([SubResource("Resource_l3tir")])
DurationType = 1
HasPeriodicApplication = true
Period = SubResource("Resource_cykp3")
ExecuteOnApplication = true
StackLimit = SubResource("Resource_rvogu")
InitialStack = SubResource("Resource_yc0gp")
Cues = null
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="Resource" id="Resource_jiqxq"]
script = ExtResource("5_drdls")
EffectData = SubResource("Resource_hgeae")
metadata/_custom_type_script = "uid://cl5hudinl1rex"
[sub_resource type="Resource" id="Resource_4aw8y"]
script = ExtResource("2_wolay")
Tag = "events.weapon.planted"
metadata/_custom_type_script = "uid://dpakv7agvir6y"
[resource]
script = ExtResource("3_mqsqr")
Name = "Weapon Planted Tick"
RetriggerInstancedAbility = true
CooldownEffects = []
AbilityBehavior = SubResource("Resource_jiqxq")
TriggerSource = 1
TriggerTag = SubResource("Resource_4aw8y")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"

View File

@@ -6,5 +6,5 @@
[resource]
script = ExtResource("2_f5qgs")
EffectData = ExtResource("1_hlq5f")
Name = "Flying tick application"
Name = "Planted tick application"
metadata/_custom_type_script = "uid://cl5hudinl1rex"

View File

@@ -20,7 +20,7 @@ BaseValue = 1
[resource]
script = ExtResource("4_7ma6b")
Name = "Call Flying Tick Event Periodically"
Name = "Call Planted Tick Event Periodically"
Modifiers = []
Components = []
Executions = Array[Object]([ExtResource("1_cd13a")])

View File

@@ -0,0 +1,66 @@
[gd_resource type="Resource" script_class="ForgeEffectData" format=3 uid="uid://bn1getr10b4dx"]
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="1_uev3b"]
[ext_resource type="Resource" uid="uid://4rkwr10pc6tp" path="res://forge/resources/custom_executions/physical_damage_calculator.tres" id="2_o3goh"]
[ext_resource type="Resource" uid="uid://cc1qrmbp12fk8" path="res://forge/resources/custom_executions/player_hit_knoback_calculation.tres" id="3_bydif"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="4_sd5hm"]
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="5_l6rea"]
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="6_juqkp"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="7_njbpb"]
[sub_resource type="Resource" id="Resource_0cyim"]
script = ExtResource("4_sd5hm")
BaseValue = 1
[sub_resource type="Resource" id="Resource_h8gc3"]
script = ExtResource("5_l6rea")
BaseValue = 1.0
[sub_resource type="Resource" id="Resource_ewmvj"]
script = ExtResource("5_l6rea")
[sub_resource type="Resource" id="Resource_8wvcn"]
script = ExtResource("5_l6rea")
[sub_resource type="Resource" id="Resource_no8t2"]
script = ExtResource("5_l6rea")
BaseValue = 1.0
[sub_resource type="Resource" id="Resource_vioyh"]
script = ExtResource("5_l6rea")
[sub_resource type="Resource" id="Resource_m6xnn"]
script = ExtResource("5_l6rea")
[sub_resource type="Resource" id="Resource_uinv8"]
script = ExtResource("5_l6rea")
BaseValue = 40.0
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
[sub_resource type="Resource" id="Resource_04hqa"]
script = ExtResource("6_juqkp")
Attribute = "MetaAttributeSet.IncomingDamage"
Operation = 2
ScalableFloat = SubResource("Resource_uinv8")
Coefficient = SubResource("Resource_no8t2")
PreMultiplyAdditiveValue = SubResource("Resource_m6xnn")
PostMultiplyAdditiveValue = SubResource("Resource_vioyh")
CalculatorCoefficient = SubResource("Resource_h8gc3")
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_8wvcn")
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_ewmvj")
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
[sub_resource type="Resource" id="Resource_8fbeq"]
script = ExtResource("4_sd5hm")
BaseValue = 1
[resource]
script = ExtResource("7_njbpb")
Name = "Player Hit Effect"
Modifiers = Array[Object]([SubResource("Resource_04hqa")])
Components = Array[Object]([ExtResource("1_uev3b")])
Executions = Array[Object]([ExtResource("2_o3goh"), ExtResource("3_bydif")])
StackLimit = SubResource("Resource_8fbeq")
InitialStack = SubResource("Resource_0cyim")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://bk3rv5jrutfjw"]
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_gt2iq"]
[resource]
script = ExtResource("1_gt2iq")
ContainerTags = Array[String](["events.weapon.plantedtick"])
metadata/_custom_type_script = "uid://cw525n4mjqgw0"

View File

@@ -0,0 +1,12 @@
using Godot;
namespace Movementtests.interfaces;
public interface IDisableable
{
bool IsDisabled { get; set; }
[Export] float DisableDuration { get; set; }
void Disable();
void Enable();
}

View File

@@ -1,12 +0,0 @@
using Godot;
namespace Movementtests.interfaces;
public interface IStunnable
{
bool IsStunned { get; set; }
[Export] float StunDuration { get; set; }
void Stun();
void Unstun();
}

View File

@@ -9,34 +9,27 @@ using Movementtests.systems;
namespace Movementtests.managers;
public partial class WeaponEventAbilityData(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior ability)
: RefCounted
{
public WeaponSystem.WeaponEvent ForEvent { get; private set; } = forEvent;
public ForgeAbilityBehavior Ability { get; private set; } = ability;
}
[GlobalClass, Meta(typeof(IAutoNode))]
public partial class InventoryManager : Node, IDisposable
{
public override void _Notification(int what) => this.Notify(what);
#region Signals
[Signal]
public delegate void WeaponEventAbilityAddedEventHandler(WeaponEventAbilityData data);
[Signal]
public delegate void WeaponEventAbilityRemovedEventHandler(WeaponEventAbilityData data);
#endregion
private AutoSet<ForgeAbilityBehavior> _startedFlyingAbilities = new();
private AutoSet<ForgeAbilityBehavior> _flyingTickAbilities = new();
private AutoSet<ForgeAbilityBehavior> _stoppedFlyingAbilities = new();
private AutoSet<ForgeAbilityBehavior> _startedPlantedAbilities = new();
private AutoSet<ForgeAbilityBehavior> _plantedTickAbilities = new();
private AutoSet<ForgeAbilityBehavior> _stoppedPlantedAbilities = new();
public IAutoSet<ForgeAbilityBehavior> StartedFlyingAbilities => _startedFlyingAbilities;
public IAutoSet<ForgeAbilityBehavior> FlyingTickAbilities => _flyingTickAbilities;
public IAutoSet<ForgeAbilityBehavior> StoppedFlyingAbilities => _stoppedFlyingAbilities;
public IAutoSet<ForgeAbilityBehavior> StartedPlantedAbilities => _startedPlantedAbilities;
public IAutoSet<ForgeAbilityBehavior> PlantedTickAbilities => _plantedTickAbilities;
public IAutoSet<ForgeAbilityBehavior> StoppedPlantedAbilities => _stoppedPlantedAbilities;
private readonly AutoMap<WeaponSystem.WeaponEvent, AutoSet<ForgeAbilityBehavior>> _weaponEventsInventory = new();
public IAutoMap<WeaponSystem.WeaponEvent, AutoSet<ForgeAbilityBehavior>> WeaponEventsInventory => _weaponEventsInventory;
@@ -44,15 +37,23 @@ public partial class InventoryManager : Node, IDisposable
public void OnReady()
{
_weaponEventsInventory[WeaponSystem.WeaponEvent.StartedFlying] = _startedFlyingAbilities;
_weaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick] = _flyingTickAbilities;
_weaponEventsInventory[WeaponSystem.WeaponEvent.StoppedFlying] = _stoppedFlyingAbilities;
_weaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick] = _flyingTickAbilities;
_weaponEventsInventory[WeaponSystem.WeaponEvent.StartedPlanted] = _startedPlantedAbilities;
_weaponEventsInventory[WeaponSystem.WeaponEvent.StoppedPlanted] = _stoppedPlantedAbilities;
_weaponEventsInventory[WeaponSystem.WeaponEvent.PlantedTick] = _plantedTickAbilities;
}
public void InitializeFromResource(WeaponInventory inventory)
{
_startedFlyingAbilities = new AutoSet<ForgeAbilityBehavior>(inventory.OnWeaponStartedFlyingAbilities);
_flyingTickAbilities = new AutoSet<ForgeAbilityBehavior>(inventory.OnWeaponFlyingTickAbilities);
_stoppedFlyingAbilities = new AutoSet<ForgeAbilityBehavior>(inventory.OnWeaponStoppedFlyingAbilities);
var eventMap = inventory.GetEventAbilitiesMap();
_startedFlyingAbilities = new AutoSet<ForgeAbilityBehavior>(eventMap[WeaponSystem.WeaponEvent.StartedFlying]);
_stoppedFlyingAbilities = new AutoSet<ForgeAbilityBehavior>(eventMap[WeaponSystem.WeaponEvent.StoppedFlying]);
_flyingTickAbilities = new AutoSet<ForgeAbilityBehavior>(eventMap[WeaponSystem.WeaponEvent.FlyingTick]);
_startedPlantedAbilities = new AutoSet<ForgeAbilityBehavior>(eventMap[WeaponSystem.WeaponEvent.StartedPlanted]);
_stoppedPlantedAbilities = new AutoSet<ForgeAbilityBehavior>(eventMap[WeaponSystem.WeaponEvent.StoppedPlanted]);
_plantedTickAbilities = new AutoSet<ForgeAbilityBehavior>(eventMap[WeaponSystem.WeaponEvent.PlantedTick]);
}
public new void Dispose()
@@ -60,8 +61,12 @@ public partial class InventoryManager : Node, IDisposable
GC.SuppressFinalize(this);
_startedFlyingAbilities.Dispose();
_flyingTickAbilities.Dispose();
_stoppedFlyingAbilities.Dispose();
_flyingTickAbilities.Dispose();
_startedPlantedAbilities.Dispose();
_stoppedPlantedAbilities.Dispose();
_plantedTickAbilities.Dispose();
_weaponEventsInventory.Dispose();
base.Dispose();

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Godot;
using Movementtests.systems;
namespace Movementtests.managers;
@@ -8,15 +9,43 @@ namespace Movementtests.managers;
public partial class WeaponInventory(
ForgeAbilityBehavior[] onWeaponStartedFlyingAbilities,
ForgeAbilityBehavior[] onWeaponFlyingTickAbilities,
ForgeAbilityBehavior[] onWeaponStoppedFlyingAbilities
ForgeAbilityBehavior[] onWeaponStoppedFlyingAbilities,
ForgeAbilityBehavior[] onWeaponStartedPlantedAbilities,
ForgeAbilityBehavior[] onWeaponPlantedTickAbilities,
ForgeAbilityBehavior[] onWeaponStoppedPlantedAbilities
) : Resource
{
[ExportGroup("Flying abilities")]
[Export]
public ForgeAbilityBehavior[] OnWeaponStartedFlyingAbilities { get; set; } = onWeaponStartedFlyingAbilities;
[Export]
public ForgeAbilityBehavior[] OnWeaponFlyingTickAbilities { get; set; } = onWeaponFlyingTickAbilities;
[Export]
public ForgeAbilityBehavior[] OnWeaponStoppedFlyingAbilities { get; set; } = onWeaponStoppedFlyingAbilities;
[ExportGroup("Planted abilities")]
[Export]
public ForgeAbilityBehavior[] OnWeaponStartedPlantedAbilities { get; set; } = onWeaponStartedPlantedAbilities;
[Export]
public ForgeAbilityBehavior[] OnWeaponPlantedTickAbilities { get; set; } = onWeaponPlantedTickAbilities;
[Export]
public ForgeAbilityBehavior[] OnWeaponStoppedPlantedAbilities { get; set; } = onWeaponStoppedPlantedAbilities;
public WeaponInventory() : this([], [], []) {}
public WeaponInventory() : this([], [], [], [], [], [])
{
}
public Dictionary<WeaponSystem.WeaponEvent, ForgeAbilityBehavior[]> GetEventAbilitiesMap()
{
return new Dictionary<WeaponSystem.WeaponEvent, ForgeAbilityBehavior[]>
{
{ WeaponSystem.WeaponEvent.StartedFlying, OnWeaponStartedFlyingAbilities },
{ WeaponSystem.WeaponEvent.StoppedFlying, OnWeaponStoppedFlyingAbilities },
{ WeaponSystem.WeaponEvent.FlyingTick, OnWeaponFlyingTickAbilities },
{ WeaponSystem.WeaponEvent.StartedPlanted, OnWeaponStartedPlantedAbilities },
{ WeaponSystem.WeaponEvent.StoppedPlanted, OnWeaponStoppedPlantedAbilities },
{ WeaponSystem.WeaponEvent.PlantedTick, OnWeaponPlantedTickAbilities },
};
}
}

View File

@@ -26,11 +26,7 @@
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="25_nrosh"]
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="25_x7fl1"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="26_lu3yt"]
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="27_lgco8"]
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="28_51ivn"]
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="30_3w3wd"]
[ext_resource type="Resource" uid="uid://bohbojc68j7y1" path="res://scenes/enemies/grounded_enemy/grounded_enemy_health.tres" id="31_5hbxb"]
[ext_resource type="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="32_hmdts"]
[sub_resource type="LabelSettings" id="LabelSettings_2k3fr"]
font_size = 30
@@ -382,11 +378,9 @@ shadow_enabled = true
shadow_opacity = 0.95
shadow_blur = 2.435
[node name="Player" parent="." unique_id=341554101 node_paths=PackedStringArray("TutorialWeaponTarget") instance=ExtResource("1_2vsi6")]
[node name="Player" parent="." unique_id=341554101 instance=ExtResource("1_2vsi6")]
transform = Transform3D(0.054514527, 0, -0.9985129, 0, 1, 0, 0.9985129, 0, 0.054514527, -6, 75.5, -13.5)
collision_layer = 17
TutorialWeaponTarget = NodePath("../PlacedTutorialWeapon/WeaponLocationTarget")
TutorialDone = true
AccelerationAir = 1.5
[node name="DebugLayer" type="CanvasLayer" parent="." unique_id=533965065]
@@ -448,8 +442,6 @@ spot_angle_attenuation = 10.556052
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 19, 43, -111.5)
EnemyToSpawn = ExtResource("25_x7fl1")
MovementInputs = SubResource("Resource_pxspk")
HealthInputs = ExtResource("27_lgco8")
DamageInputs = ExtResource("28_51ivn")
Target = NodePath("../Player")
IsActiveOnStart = false
@@ -457,8 +449,6 @@ IsActiveOnStart = false
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 31, 7.5, -88)
EnemyToSpawn = ExtResource("25_nrosh")
MovementInputs = ExtResource("30_3w3wd")
HealthInputs = ExtResource("31_5hbxb")
DamageInputs = ExtResource("32_hmdts")
Target = NodePath("../Player")
IsActiveOnStart = false

View File

@@ -1,178 +0,0 @@
[gd_scene format=3 uid="uid://q7uc1h2jpbd2"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://scenes/player_controller/PlayerController.tscn" id="1_62kkh"]
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/materials/greybox/m_greybox.tres" id="2_3uydm"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_5fa36"]
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="3_3uydm"]
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="5_8fd2t"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="5_ybosk"]
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="6_7m3bq"]
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="7_caohq"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="9_2e4ci"]
[ext_resource type="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="9_dmw1t"]
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="9_gp7s3"]
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="10_spw1u"]
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="11_2e4ci"]
[ext_resource type="PackedScene" uid="uid://qup00a7x2sji" path="res://scenes/fixed_dash_target/fixed_dashthrough_target.tscn" id="15_5fa36"]
[sub_resource type="Resource" id="Resource_1hrkh"]
script = ExtResource("2_5fa36")
DamageDealt = 1.0
metadata/_custom_type_script = "uid://jitubgv6judn"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0xm2m"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
[sub_resource type="Sky" id="Sky_h2yge"]
sky_material = SubResource("ProceduralSkyMaterial_0xm2m")
[sub_resource type="Environment" id="Environment_1bvp3"]
background_mode = 2
sky = SubResource("Sky_h2yge")
ambient_light_source = 2
ambient_light_color = Color(0.576076, 0.459788, 0.652401, 1)
reflected_light_source = 2
tonemap_mode = 4
tonemap_exposure = 1.32
ssao_enabled = true
ssao_radius = 3.61
ssil_enabled = true
ssil_radius = 8.4
sdfgi_use_occlusion = true
glow_enabled = true
[sub_resource type="Resource" id="Resource_5fa36"]
script = ExtResource("5_ybosk")
GravityModifier = 5.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
[sub_resource type="Resource" id="Resource_ybosk"]
script = ExtResource("9_2e4ci")
StartingHealth = 1.0
metadata/_custom_type_script = "uid://baiapod3csndf"
[node name="Main" type="Node3D" unique_id=2140535950]
[node name="Player" parent="." unique_id=809599523 instance=ExtResource("1_62kkh")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 7.5)
TutorialDone = true
RDamage = SubResource("Resource_1hrkh")
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=2082209843]
environment = SubResource("Environment_1bvp3")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=63930954]
transform = Transform3D(-0.772218, 0.611111, 0.173844, 0.0446935, -0.220691, 0.974319, 0.633783, 0.760157, 0.143109, 0, 0, 0)
shadow_enabled = true
[node name="Greybox" type="CSGCombiner3D" parent="." unique_id=1207469789]
use_collision = true
collision_layer = 256
collision_mask = 65553
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox" unique_id=319978745]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
use_collision = true
size = Vector3(100, 1, 190.741)
material = ExtResource("2_3uydm")
[node name="CSGBox3D2" type="CSGBox3D" parent="Greybox" unique_id=1919989912]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.346, 4.5, 2.7915)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D6" type="CSGBox3D" parent="Greybox" unique_id=1213152660]
transform = Transform3D(0.70710677, 0, -0.70710677, 0, 1, 0, 0.70710677, 0, 0.70710677, -15.846001, 2.75, 2.0415)
use_collision = true
size = Vector3(6.5, 7.5, 11)
material = ExtResource("2_3uydm")
[node name="CSGBox3D7" type="CSGBox3D" parent="Greybox" unique_id=1851111034]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.346001, 1, 1.0415001)
use_collision = true
size = Vector3(6.5, 4, 17)
material = ExtResource("2_3uydm")
[node name="CSGBox3D10" type="CSGBox3D" parent="Greybox" unique_id=50441196]
transform = Transform3D(1, 0, 0, 0, 0.9659258, 0.25881904, 0, -0.25881904, 0.9659258, 13.653999, 0.9705714, -5.336278)
use_collision = true
size = Vector3(6.5, 4, 24.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D8" type="CSGBox3D" parent="Greybox" unique_id=660741680]
transform = Transform3D(0.81915206, 0, 0.57357645, 0, 1, 0, -0.57357645, 0, 0.81915206, -7.3460007, 0, -3.9585)
use_collision = true
size = Vector3(6.5, 4, 17)
material = ExtResource("2_3uydm")
[node name="CSGBox3D3" type="CSGBox3D" parent="Greybox" unique_id=994335188]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.154, 4.5, 2.7915)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D9" type="CSGBox3D" parent="Greybox" unique_id=377955376]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 50.154, 0, -20.4585)
use_collision = true
size = Vector3(6.5, 2, 116)
material = ExtResource("2_3uydm")
[node name="CSGBox3D4" type="CSGBox3D" parent="Greybox" unique_id=1145091341]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.154, 4.5, -14.2085)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D5" type="CSGBox3D" parent="Greybox" unique_id=53153206]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.8460007, 4.5, 17.7915)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="FixedDashthroughTarget" parent="." unique_id=1206948786 instance=ExtResource("15_5fa36")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 3.5, 2.5)
[node name="Enemy" parent="." unique_id=935342749 node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.5, 2.5, -8.336809)
Target = NodePath("../Player")
RMovement = SubResource("Resource_5fa36")
[node name="Enemy2" parent="." unique_id=1014680385 node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13, 0, -17.33681)
Target = NodePath("../Player")
RMovement = SubResource("Resource_5fa36")
[node name="Enemy3" parent="." unique_id=236903306 node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 4, -3.3368092)
Target = NodePath("../Player")
RMovement = SubResource("Resource_5fa36")
[node name="FlyingEnemy" parent="." unique_id=1135200290 node_paths=PackedStringArray("Target") instance=ExtResource("5_8fd2t")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 7, -16)
Target = NodePath("../Player")
RMovement = SubResource("Resource_5fa36")
[node name="FlyingEnemy2" parent="." unique_id=1853592183 node_paths=PackedStringArray("Target") instance=ExtResource("5_8fd2t")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 7, -16)
Target = NodePath("../Player")
RMovement = SubResource("Resource_5fa36")
[node name="GroundedSpawner" parent="." unique_id=140494238 node_paths=PackedStringArray("Target") instance=ExtResource("6_7m3bq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.5, -15)
EnemyToSpawn = ExtResource("3_3uydm")
MovementInputs = ExtResource("7_caohq")
HealthInputs = SubResource("Resource_ybosk")
DamageInputs = ExtResource("9_dmw1t")
Target = NodePath("../Player")
IsActiveOnStart = false
[node name="FlyingSpawner" parent="." unique_id=252188747 node_paths=PackedStringArray("Target") instance=ExtResource("6_7m3bq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 11, -14)
EnemyToSpawn = ExtResource("5_8fd2t")
MovementInputs = ExtResource("10_spw1u")
HealthInputs = ExtResource("11_2e4ci")
DamageInputs = ExtResource("9_gp7s3")
Target = NodePath("../Player")
IsActiveOnStart = false

View File

@@ -1,407 +0,0 @@
[gd_scene format=3 uid="uid://cxbskue0lj2gv"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://scenes/player_controller/PlayerController.tscn" id="1_ig7tw"]
[ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="2_0xm2m"]
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/materials/greybox/m_greybox.tres" id="3_h2yge"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0xm2m"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
[sub_resource type="Sky" id="Sky_h2yge"]
sky_material = SubResource("ProceduralSkyMaterial_0xm2m")
[sub_resource type="Environment" id="Environment_1bvp3"]
background_mode = 2
sky = SubResource("Sky_h2yge")
ambient_light_source = 2
ambient_light_color = Color(0.576076, 0.459788, 0.652401, 1)
reflected_light_source = 2
tonemap_mode = 4
tonemap_exposure = 1.32
ssao_enabled = true
ssao_radius = 3.61
ssil_enabled = true
ssil_radius = 8.4
sdfgi_use_occlusion = true
glow_enabled = true
[node name="Main" type="Node3D" unique_id=985886321]
[node name="Player" parent="." unique_id=376011014 instance=ExtResource("1_ig7tw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7981, 1.6118, 39.3006)
TutorialDone = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1240471357]
environment = SubResource("Environment_1bvp3")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=346312364]
transform = Transform3D(-0.772218, 0.611111, 0.173844, 0.0446935, -0.220691, 0.974319, 0.633783, 0.760157, 0.143109, 0, 0, 0)
shadow_enabled = true
[node name="DebugLayer" type="CanvasLayer" parent="." unique_id=17611482]
[node name="GuideDebugger" parent="DebugLayer" unique_id=1527386667 instance=ExtResource("2_0xm2m")]
visible = false
[node name="Greybox" type="CSGCombiner3D" parent="." unique_id=202319879]
use_collision = true
collision_layer = 3
collision_mask = 5
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox" unique_id=973340000]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.09619, -0.472656, -46.3293)
use_collision = true
size = Vector3(100, 1, 190.741)
material = ExtResource("3_h2yge")
[node name="CSGBox3D2" type="CSGBox3D" parent="Greybox" unique_id=233983464]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 5, 11.0613)
use_collision = true
size = Vector3(10, 10, 57.8774)
material = ExtResource("3_h2yge")
[node name="CSGBox3D19" type="CSGBox3D" parent="Greybox" unique_id=964201148]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.5, 8.25323, -39.2813)
use_collision = true
size = Vector3(13, 16.5065, 47)
material = ExtResource("3_h2yge")
[node name="CSGBox3D30" type="CSGBox3D" parent="Greybox" unique_id=44194028]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 34.3, -33.2813)
use_collision = true
size = Vector3(10, 2, 35)
material = ExtResource("3_h2yge")
[node name="CSGBox3D31" type="CSGBox3D" parent="Greybox" unique_id=129657386]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12.5, 26.3, -47.4313)
use_collision = true
size = Vector3(79, 2, 7.3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox" unique_id=1195124026]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.5, 15.3, -47.4313)
use_collision = true
size = Vector3(29, 2, 7.3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox" unique_id=1660033609]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.5, 20.8, -44.2813)
use_collision = true
size = Vector3(19, 13, 1)
material = ExtResource("3_h2yge")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox" unique_id=1494958881]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.5, 20.8, -51.2813)
use_collision = true
size = Vector3(19, 13, 1)
material = ExtResource("3_h2yge")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox" unique_id=608991527]
transform = Transform3D(0.866025, 0.5, 0, -0.5, 0.866025, 0, 0, 0, 1, 17.0311, 6.45, -47.4313)
use_collision = true
size = Vector3(36, 2, 7.3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox" unique_id=1803245548]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21, 30.3, -47.4313)
use_collision = true
size = Vector3(12, 10, 7.3)
material = ExtResource("3_h2yge")
[node name="Stairs" type="CSGCombiner3D" parent="Greybox" unique_id=1805647048]
use_collision = true
[node name="CSGBox3D5" type="CSGBox3D" parent="Greybox/Stairs" unique_id=961319320]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.0294, 0.5, 32.891)
size = Vector3(3, 1, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D6" type="CSGBox3D" parent="Greybox/Stairs" unique_id=1360044459]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 1, 29.905)
size = Vector3(3, 2, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D7" type="CSGBox3D" parent="Greybox/Stairs" unique_id=1499624262]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 1.5, 26.9138)
size = Vector3(3, 3, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D8" type="CSGBox3D" parent="Greybox/Stairs" unique_id=1412980197]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 2, 23.9462)
size = Vector3(3, 4, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D9" type="CSGBox3D" parent="Greybox/Stairs" unique_id=1310937492]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 2.5, 20.975)
size = Vector3(3, 5, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D10" type="CSGBox3D" parent="Greybox/Stairs" unique_id=2023609911]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 3, 17.9825)
size = Vector3(3, 6, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D11" type="CSGBox3D" parent="Greybox/Stairs" unique_id=393957727]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 3.5, 15)
size = Vector3(3, 7, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D12" type="CSGBox3D" parent="Greybox/Stairs" unique_id=1704667554]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 4, 12.018)
size = Vector3(3, 8, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D13" type="CSGBox3D" parent="Greybox/Stairs" unique_id=1710300338]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 4.5, 9.04904)
size = Vector3(3, 9, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D3" type="CSGBox3D" parent="Greybox" unique_id=1317342293]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.0524, 10.795, 6.27246)
use_collision = true
size = Vector3(39.9961, 21.6211, 2.62695)
material = ExtResource("3_h2yge")
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="Greybox/CSGBox3D3" unique_id=81700125]
transform = Transform3D(4.2, 0, 0, 0, -6.11959e-08, -7, 0, 1.4, -3.0598e-07, 8.96759, -10.8105, -0.293446)
operation = 2
radius = 1.0
height = 5.0
sides = 40
[node name="CSGCylinder3D2" type="CSGCylinder3D" parent="Greybox/CSGBox3D3" unique_id=1626645027]
transform = Transform3D(4.2, 0, 0, 0, -6.11959e-08, -7, 0, 1.4, -3.0598e-07, -11.9615, -10.8105, -0.293446)
operation = 2
radius = 1.0
height = 5.0
sides = 40
[node name="CSGBox3D4" type="CSGBox3D" parent="Greybox" unique_id=860496794]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 35.9586, 5, 15.3133)
use_collision = true
size = Vector3(25.9171, 10, 66.0572)
material = ExtResource("3_h2yge")
[node name="CSGBox3D24" type="CSGBox3D" parent="Greybox/CSGBox3D4" unique_id=953680138]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -4.4306, -1.45655, 25.6867)
operation = 2
size = Vector3(12, 7, 35)
material = ExtResource("3_h2yge")
[node name="CSGBox3D25" type="CSGBox3D" parent="Greybox/CSGBox3D4" unique_id=647976782]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.0694, -1.45655, 7.6867)
operation = 2
size = Vector3(12, 7, 30)
material = ExtResource("3_h2yge")
[node name="CSGBox3D26" type="CSGBox3D" parent="Greybox/CSGBox3D4" unique_id=981384844]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 9.0694, 1.04345, -3.3133)
operation = 2
size = Vector3(12, 12, 8)
material = ExtResource("3_h2yge")
[node name="CSGBox3D9" type="CSGBox3D" parent="Greybox" unique_id=2097153680]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.5038, 2.5, 7.30957)
size = Vector3(3, 5, 25.3809)
material = ExtResource("3_h2yge")
[node name="CSGBox3D10" type="CSGBox3D" parent="Greybox" unique_id=760209768]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 11.517, 1.29345, 21.5)
size = Vector3(3, 2.5, 22.978)
material = ExtResource("3_h2yge")
[node name="CSGBox3D5" type="CSGBox3D" parent="Greybox" unique_id=2030989025]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.45774, 10.7885, -6.32539)
use_collision = true
size = Vector3(2.15405, 21.577, 22.6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D21" type="CSGBox3D" parent="Greybox/CSGBox3D5" unique_id=929527256]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.10074, 8.35729, -0.350719)
operation = 2
use_collision = true
size = Vector3(9.25954, 5.10669, 7.561)
material = ExtResource("3_h2yge")
[node name="CSGBox3D20" type="CSGBox3D" parent="Greybox" unique_id=1990392027]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15.7766, 17.433, -31.0838)
use_collision = true
size = Vector3(2.15405, 35.9, 27)
material = ExtResource("3_h2yge")
[node name="CSGBox3D37" type="CSGBox3D" parent="Greybox/CSGBox3D20" unique_id=200448590]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.174269, 10.3449, -0.91618)
operation = 2
use_collision = true
size = Vector3(4, 4, 3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D25" type="CSGBox3D" parent="Greybox" unique_id=1913858984]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -3.02663, 27.983, -16.9838)
use_collision = true
size = Vector3(2.15405, 13, 52.3)
material = ExtResource("3_h2yge")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/CSGBox3D25" unique_id=426380119]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.41618, -2.15506, -19.5757)
operation = 2
use_collision = true
size = Vector3(3, 7, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox/CSGBox3D25" unique_id=656184598]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.41618, -2.15506, -8.57573)
operation = 2
use_collision = true
size = Vector3(3, 7, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox/CSGBox3D25" unique_id=710213414]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.41618, -2.15506, 4.42427)
operation = 2
use_collision = true
size = Vector3(3, 7, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D29" type="CSGBox3D" parent="Greybox" unique_id=1552229602]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 21.9734, 27.983, -4.93377)
use_collision = true
size = Vector3(2.15405, 13, 25)
material = ExtResource("3_h2yge")
[node name="CSGBox3D26" type="CSGBox3D" parent="Greybox" unique_id=742482926]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -3.07663, 27.983, 6.51623)
use_collision = true
size = Vector3(2.15405, 13, 52.2)
material = ExtResource("3_h2yge")
[node name="CSGBox3D30" type="CSGBox3D" parent="Greybox/CSGBox3D26" unique_id=2034823641]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 1.08382, -0.65506, -19.6257)
operation = 2
use_collision = true
size = Vector3(3, 4, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D31" type="CSGBox3D" parent="Greybox/CSGBox3D26" unique_id=219731987]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 1.08382, -0.65506, -8.62572)
operation = 2
use_collision = true
size = Vector3(3, 4, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox/CSGBox3D26" unique_id=122544263]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 1.08382, -0.65506, 3.37428)
operation = 2
use_collision = true
size = Vector3(3, 4, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox/CSGBox3D26" unique_id=983294595]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 1.08382, -2.15506, 18.8743)
operation = 2
use_collision = true
size = Vector3(10, 7, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D6" type="CSGBox3D" parent="Greybox" unique_id=2039585908]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -7.80455, 10.8026, -16.7054)
use_collision = true
size = Vector3(1.9, 21.6052, 18.459)
material = ExtResource("3_h2yge")
[node name="CSGBox3D7" type="CSGBox3D" parent="Greybox" unique_id=1704800656]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 45.6363, 5, -30.4887)
use_collision = true
size = Vector3(6.8864, 10, 40.8848)
material = ExtResource("3_h2yge")
[node name="CSGBox3D8" type="CSGBox3D" parent="Greybox" unique_id=102084295]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 50.0149, 26.122, -0.963737)
use_collision = true
size = Vector3(2.14108, 52.2441, 99.9347)
material = ExtResource("3_h2yge")
[node name="CSGBox3D11" type="CSGBox3D" parent="Greybox" unique_id=1645938429]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -28.1405, 26.122, -0.963737)
use_collision = true
size = Vector3(2.14108, 52.2441, 99.9347)
material = ExtResource("3_h2yge")
[node name="CSGBox3D12" type="CSGBox3D" parent="Greybox" unique_id=2010255775]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -93.2643, 26.122, -49.9656)
use_collision = true
size = Vector3(2.14108, 52.2441, 99.9347)
material = ExtResource("3_h2yge")
[node name="CSGBox3D13" type="CSGBox3D" parent="Greybox" unique_id=779512432]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 10.7529, 26.122, 49.3889)
use_collision = true
size = Vector3(2.14108, 52.2441, 99.9347)
material = ExtResource("3_h2yge")
[node name="CSGBox3D14" type="CSGBox3D" parent="Greybox" unique_id=593545609]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.534, 10.8458, 27.1386)
use_collision = true
size = Vector3(1.10791, 1.71436, 25.7228)
material = ExtResource("3_h2yge")
[node name="CSGBox3D21" type="CSGBox3D" parent="Greybox" unique_id=913202979]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 23.4606, 10.8458, -4.97476)
use_collision = true
size = Vector3(1.10791, 1.71436, 25.2857)
material = ExtResource("3_h2yge")
[node name="CSGBox3D24" type="CSGBox3D" parent="Greybox" unique_id=1595738887]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 23.4606, 16.1886, -17.1176)
use_collision = true
size = Vector3(1.10791, 12.4, 1)
material = ExtResource("3_h2yge")
[node name="CSGBox3D22" type="CSGBox3D" parent="Greybox" unique_id=100240267]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 36.3499, 10.8458, 7.02524)
use_collision = true
size = Vector3(1.10791, 1.71436, 28)
material = ExtResource("3_h2yge")
[node name="CSGBox3D23" type="CSGBox3D" parent="Greybox" unique_id=1131367437]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 36.8499, 10.8458, -17.0748)
use_collision = true
size = Vector3(1.10791, 1.71436, 27)
material = ExtResource("3_h2yge")
[node name="CSGBox3D27" type="CSGBox3D" parent="Greybox" unique_id=1865223494]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 4.19987, 23.1458, -23.0748)
use_collision = true
size = Vector3(1.10791, 1.71436, 37.7)
material = ExtResource("3_h2yge")
[node name="CSGBox3D28" type="CSGBox3D" parent="Greybox" unique_id=1060380653]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 22.5999, 23.1458, -20.2248)
use_collision = true
size = Vector3(1.10791, 1.71436, 6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D15" type="CSGBox3D" parent="Greybox" unique_id=1299247533]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.9058, 10.795, 47.0594)
use_collision = true
size = Vector3(76.2239, 21.6211, 2.62695)
material = ExtResource("3_h2yge")
[node name="CSGBox3D16" type="CSGBox3D" parent="Greybox" unique_id=1365802849]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.02149, 21.8279, -7.89995)
use_collision = true
size = Vector3(52.1412, 1, 31)
material = ExtResource("3_h2yge")
[node name="CSGBox3D17" type="CSGBox3D" parent="Greybox" unique_id=2135806884]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.02149, 34.8279, -5.19995)
use_collision = true
size = Vector3(52.1412, 1, 25.6)
material = ExtResource("3_h2yge")
[node name="CSGBox3D18" type="CSGBox3D" parent="Greybox" unique_id=247653250]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.534, 10.7583, -4.19618)
use_collision = true
size = Vector3(1.10791, 1.71436, 23.4043)
material = ExtResource("3_h2yge")

View File

@@ -1,915 +0,0 @@
[gd_scene format=3 uid="uid://pk8ypa04qy6x"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://scenes/player_controller/PlayerController.tscn" id="1_1s2y7"]
[ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="2_epx65"]
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/materials/greybox/m_greybox.tres" id="3_vvhq3"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0xm2m"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
[sub_resource type="Sky" id="Sky_h2yge"]
sky_material = SubResource("ProceduralSkyMaterial_0xm2m")
[sub_resource type="Environment" id="Environment_1bvp3"]
background_mode = 2
sky = SubResource("Sky_h2yge")
ambient_light_source = 2
ambient_light_color = Color(0.576076, 0.459788, 0.652401, 1)
reflected_light_source = 2
tonemap_mode = 4
tonemap_exposure = 1.32
ssao_enabled = true
ssao_radius = 3.61
ssil_enabled = true
ssil_radius = 8.4
sdfgi_use_occlusion = true
glow_enabled = true
[node name="Main" type="Node3D" unique_id=1886692589]
[node name="Player" parent="." unique_id=1926439269 instance=ExtResource("1_1s2y7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1.5)
TutorialDone = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1918922070]
environment = SubResource("Environment_1bvp3")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1220382102]
transform = Transform3D(-0.772218, 0.611111, 0.173844, 0.0446935, -0.220691, 0.974319, 0.633783, 0.760157, 0.143109, 0, 0, 0)
shadow_enabled = true
[node name="DebugLayer" type="CanvasLayer" parent="." unique_id=2035564069]
[node name="GuideDebugger" parent="DebugLayer" unique_id=1346724862 instance=ExtResource("2_epx65")]
visible = false
[node name="Greybox" type="CSGCombiner3D" parent="." unique_id=947987680]
use_collision = true
collision_layer = 256
collision_mask = 65553
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox" unique_id=1658565485]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
use_collision = true
size = Vector3(100, 1, 190.741)
material = ExtResource("3_vvhq3")
[node name="RunningTrack" type="CSGCombiner3D" parent="Greybox" unique_id=878428333]
[node name="CSGBox3D2" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=1524612867]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D3" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=1343324188]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -10)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D4" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=2003839018]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -20)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D5" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=12532369]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -30)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D6" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=1528078611]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -40)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D7" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=1374413337]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -50)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D8" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=1756322621]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 0)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D9" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=991157972]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, -10)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D10" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=1421677964]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, -20)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D11" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=147727252]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, -30)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D12" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=190006939]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, -40)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D13" type="CSGBox3D" parent="Greybox/RunningTrack" unique_id=397218140]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, -50)
use_collision = true
size = Vector3(0.2, 2, 0.2)
material = ExtResource("3_vvhq3")
[node name="Label3D" type="Label3D" parent="Greybox/RunningTrack" unique_id=2077484418]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -9.5)
text = "10m"
[node name="Label3D6" type="Label3D" parent="Greybox/RunningTrack" unique_id=157546019]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 27.5, 0.1, 1)
text = "10deg
"
[node name="Label3D7" type="Label3D" parent="Greybox/RunningTrack" unique_id=1322657783]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 30.5, 0.1, 1)
text = "20deg
"
[node name="Label3D8" type="Label3D" parent="Greybox/RunningTrack" unique_id=2087446523]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 33.5, 0.1, 1)
text = "30deg
"
[node name="Label3D2" type="Label3D" parent="Greybox/RunningTrack" unique_id=631102816]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -19.5)
text = "20m"
[node name="Label3D3" type="Label3D" parent="Greybox/RunningTrack" unique_id=1135391266]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -29.5)
text = "30m"
[node name="Label3D4" type="Label3D" parent="Greybox/RunningTrack" unique_id=646298813]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -39.5)
text = "40m"
[node name="Label3D5" type="Label3D" parent="Greybox/RunningTrack" unique_id=2110989391]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -49)
text = "50m"
[node name="JumpHeights" type="CSGCombiner3D" parent="Greybox" unique_id=346821943]
[node name="Label3D6" type="Label3D" parent="Greybox/JumpHeights" unique_id=210969284]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -1.5)
text = "0.5m"
[node name="Label3D7" type="Label3D" parent="Greybox/JumpHeights" unique_id=1563882963]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -6.5)
text = "1m"
[node name="Label3D22" type="Label3D" parent="Greybox/JumpHeights" unique_id=1538473923]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, 1)
text = "1.5m"
[node name="Label3D23" type="Label3D" parent="Greybox/JumpHeights" unique_id=2066337875]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -11)
text = "2m"
[node name="Label3D24" type="Label3D" parent="Greybox/JumpHeights" unique_id=2019920411]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -21.5)
text = "3m"
[node name="Label3D25" type="Label3D" parent="Greybox/JumpHeights" unique_id=1152598342]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -31)
text = "4m"
[node name="Label3D26" type="Label3D" parent="Greybox/JumpHeights" unique_id=2044865263]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -41.5)
text = "5m"
[node name="Label3D27" type="Label3D" parent="Greybox/JumpHeights" unique_id=1508331602]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -51.5)
text = "6m"
[node name="Label3D28" type="Label3D" parent="Greybox/JumpHeights" unique_id=816037691]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -61)
text = "7m"
[node name="Label3D29" type="Label3D" parent="Greybox/JumpHeights" unique_id=1451982413]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -74.5)
text = "8m"
[node name="Label3D8" type="Label3D" parent="Greybox/JumpHeights" unique_id=1308191043]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -11.5)
text = "1.5m"
[node name="Label3D9" type="Label3D" parent="Greybox/JumpHeights" unique_id=1470563462]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -16.5)
text = "2m"
[node name="Label3D10" type="Label3D" parent="Greybox/JumpHeights" unique_id=517230341]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -21.5)
text = "3m"
[node name="Label3D11" type="Label3D" parent="Greybox/JumpHeights" unique_id=1293816232]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -26.5)
text = "4m"
[node name="Label3D12" type="Label3D" parent="Greybox/JumpHeights" unique_id=1806324602]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -31.5)
text = "5m"
[node name="Label3D13" type="Label3D" parent="Greybox/JumpHeights" unique_id=1770523108]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -36.5)
text = "6m"
[node name="Label3D14" type="Label3D" parent="Greybox/JumpHeights" unique_id=623833835]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -41.5)
text = "7m"
[node name="Label3D15" type="Label3D" parent="Greybox/JumpHeights" unique_id=350021472]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -46.5)
text = "8m"
[node name="Label3D16" type="Label3D" parent="Greybox/JumpHeights" unique_id=1106153648]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -51.5)
text = "9m"
[node name="Label3D17" type="Label3D" parent="Greybox/JumpHeights" unique_id=1382154683]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -56.5)
text = "10m"
[node name="Label3D18" type="Label3D" parent="Greybox/JumpHeights" unique_id=698619474]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -61.5)
text = "12.5m"
[node name="Label3D19" type="Label3D" parent="Greybox/JumpHeights" unique_id=1918747333]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -66.5)
text = "15m"
[node name="Label3D20" type="Label3D" parent="Greybox/JumpHeights" unique_id=749209142]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -71.5)
text = "17.5m"
[node name="Label3D21" type="Label3D" parent="Greybox/JumpHeights" unique_id=1268617484]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -76.5)
text = "20m"
[node name="CSGBox3D14" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=942560904]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 0.25, -1.5)
use_collision = true
size = Vector3(5, 0.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D15" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=580104271]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 0.5, -6.5)
use_collision = true
size = Vector3(5, 1, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D16" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=585408401]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 0.75, -11.5)
use_collision = true
size = Vector3(5, 1.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D17" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=808992543]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 1, -16.5)
use_collision = true
size = Vector3(5, 2, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D18" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=500341031]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 1.5, -21.5)
use_collision = true
size = Vector3(5, 3, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D19" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=127771296]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 2, -26.5)
use_collision = true
size = Vector3(5, 4, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D20" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=752300025]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 2.5, -31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D21" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=964844948]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 3, -36.5)
use_collision = true
size = Vector3(5, 6, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D22" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1284495409]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 3.5, -41.5)
use_collision = true
size = Vector3(5, 7, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D23" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1789414429]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 4, -46.5)
use_collision = true
size = Vector3(5, 8, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D24" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1372664433]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 4.5, -51.5)
use_collision = true
size = Vector3(5, 9, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D25" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1339820114]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 5, -56.5)
use_collision = true
size = Vector3(5, 10, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D30" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1631874678]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 9.5, -50)
use_collision = true
size = Vector3(5, 1, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D31" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=92296730]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 9.75, -50)
use_collision = true
size = Vector3(5, 0.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=919734519]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 11, 9.875, -50)
use_collision = true
size = Vector3(5, 0.25, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D26" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=632258873]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 6.25, -61.5)
use_collision = true
size = Vector3(5, 12.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D27" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1421623781]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 7.5, -66.5)
use_collision = true
size = Vector3(5, 15, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D28" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1274987907]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 8.75, -71.5)
use_collision = true
size = Vector3(5, 17.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D29" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1284199936]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30.25, 10, -40)
use_collision = true
size = Vector3(0.5, 20, 80)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=282038058]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.75, 10, -5)
use_collision = true
size = Vector3(7.5, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1258759526]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.75, 5, -1.5)
use_collision = true
size = Vector3(12.5, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1619601364]
transform = Transform3D(1, 0, 0, 0, 0.9848078, 0.17364816, 0, -0.17364816, 0.9848078, 22.75, 0.03095889, -30.695885)
use_collision = true
size = Vector3(12.5, 10, 58)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1868104378]
transform = Transform3D(1, 0, 0, 0, 0.9396926, 0.34202012, 0, -0.34202012, 0.9396926, 30.5, 1.5878377, -16.713436)
use_collision = true
size = Vector3(3, 6.5, 31.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1533360289]
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.5, 0, -0.5, 0.86602545, 33.5, 2.5053406, -10.524445)
use_collision = true
size = Vector3(3, 5.5, 20.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=76190477]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1165241235]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 33.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1360018990]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 36.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1830898064]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 39.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=694688329]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 42.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=498798132]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.5, 10, -15)
use_collision = true
size = Vector3(7, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1246548038]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24, 10, -25)
use_collision = true
size = Vector3(6, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1584237505]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.5, 10, -35)
use_collision = true
size = Vector3(5, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D37" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=331538659]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23, 10, -45)
use_collision = true
size = Vector3(4, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=778040676]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22.5, 10, -55)
use_collision = true
size = Vector3(3, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=749396522]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 10, -65)
use_collision = true
size = Vector3(2, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/JumpHeights" unique_id=1945303355]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.5, 10, -75)
use_collision = true
size = Vector3(1, 20, 10)
material = ExtResource("3_vvhq3")
[node name="Passageways" type="CSGCombiner3D" parent="Greybox" unique_id=677969083]
[node name="CSGBox3D30" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1481494931]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -6.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1048797470]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 1.5, -6.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D31" type="CSGBox3D" parent="Greybox/Passageways" unique_id=930969091]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -16.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1117727389]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 0.5, -16.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1320724023]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 21.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/Passageways" unique_id=2070041982]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 21.25, 0.5, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1332332880]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 28.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1557133957]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 28.25, 0.25, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 2.5, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/Passageways" unique_id=425387876]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 35.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1661141377]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 35.25, -0.5, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/Passageways" unique_id=179620552]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 42.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/Passageways" unique_id=351904606]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 42.25, -1, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/Passageways" unique_id=357200570]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 21.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/Passageways" unique_id=2085426420]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 21.25, 0.5, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/Passageways" unique_id=555217301]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 28.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/Passageways" unique_id=85616752]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 28.25, 0.25, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 2.5, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D50" type="CSGBox3D" parent="Greybox/Passageways" unique_id=28571400]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 35.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D51" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1721812352]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 35.25, -0.5, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D52" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1658935175]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 42.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D53" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1619696510]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 42.25, -1, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D54" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1250559296]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 21.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D55" type="CSGBox3D" parent="Greybox/Passageways" unique_id=248318083]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 21.25, 0.5, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D56" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1031611906]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 28.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D57" type="CSGBox3D" parent="Greybox/Passageways" unique_id=2134340759]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 28.25, 0.25, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 2.5, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D58" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1499177937]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 35.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D59" type="CSGBox3D" parent="Greybox/Passageways" unique_id=165562631]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 35.25, -0.5, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D60" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1318706705]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 42.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D61" type="CSGBox3D" parent="Greybox/Passageways" unique_id=887461416]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 42.25, -1, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1804430744]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -26.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1364916863]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 0.5, -26.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1526520386]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -36.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D37" type="CSGBox3D" parent="Greybox/Passageways" unique_id=1368661310]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -0.5, -36.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D14" type="CSGBox3D" parent="Greybox/Passageways" unique_id=283118902]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 4.5, -21.5)
use_collision = true
size = Vector3(0.5, 0.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D16" type="CSGBox3D" parent="Greybox/Passageways" unique_id=694923358]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 4.5, -31.5)
use_collision = true
size = Vector3(0.25, 0.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D15" type="CSGBox3D" parent="Greybox/Passageways" unique_id=135402735]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 4.5, -11.5)
use_collision = true
size = Vector3(1, 0.5, 5)
material = ExtResource("3_vvhq3")
[node name="Mantles" type="CSGCombiner3D" parent="Greybox" unique_id=981837550]
[node name="Label3D22" type="Label3D" parent="Greybox/Mantles" unique_id=1749350071]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -5.5, 0.1, 11)
text = "0.5m"
[node name="Label3D35" type="Label3D" parent="Greybox/Mantles" unique_id=2055966274]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -8.5, 0.1, 11)
text = "0.25m"
[node name="Label3D23" type="Label3D" parent="Greybox/Mantles" unique_id=328340961]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -2, 0.1, 11)
text = "1m"
[node name="Label3D27" type="Label3D" parent="Greybox/Mantles" unique_id=743712317]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 12.5)
text = "1m"
[node name="Label3D28" type="Label3D" parent="Greybox/Mantles" unique_id=504602524]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 12.5)
text = "1m"
[node name="Label3D29" type="Label3D" parent="Greybox/Mantles" unique_id=2030993341]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 21)
text = "2m"
[node name="Label3D30" type="Label3D" parent="Greybox/Mantles" unique_id=1124860686]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 28.5)
text = "3m"
[node name="Label3D31" type="Label3D" parent="Greybox/Mantles" unique_id=1317588075]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 21)
text = "2m"
[node name="Label3D32" type="Label3D" parent="Greybox/Mantles" unique_id=1366926955]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 28.5)
text = "3m"
[node name="Label3D24" type="Label3D" parent="Greybox/Mantles" unique_id=248801834]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 2, 0.1, 11)
text = "1.5m"
[node name="Label3D25" type="Label3D" parent="Greybox/Mantles" unique_id=1124306017]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 6, 0.1, 11)
text = "2m"
[node name="Label3D26" type="Label3D" parent="Greybox/Mantles" unique_id=1225991052]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 10, 0.1, 11)
text = "4m"
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1996945224]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 12.5)
use_collision = true
size = Vector3(4, 1, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1009493198]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 0.5, 12.25)
use_collision = true
size = Vector3(3, 1, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1749498204]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0.5, 12.75)
use_collision = true
size = Vector3(4, 1, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox/Mantles" unique_id=312432354]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0.5, 13)
use_collision = true
size = Vector3(4, 1, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D37" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1640084191]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0.5, 14)
use_collision = true
size = Vector3(4, 1, 4)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/Mantles" unique_id=301256990]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1, 20.5)
use_collision = true
size = Vector3(4, 2, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1252915649]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 1, 20.25)
use_collision = true
size = Vector3(3, 2, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1017054955]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 20.75)
use_collision = true
size = Vector3(4, 2, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1276092930]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1, 21)
use_collision = true
size = Vector3(4, 2, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1107832581]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 1, 22)
use_collision = true
size = Vector3(4, 2, 4)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/Mantles" unique_id=195563549]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, 28.5)
use_collision = true
size = Vector3(4, 3, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1422563548]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 1.5, 28.25)
use_collision = true
size = Vector3(3, 3, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/Mantles" unique_id=597518478]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1.5, 28.75)
use_collision = true
size = Vector3(4, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/Mantles" unique_id=2035828800]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1.5, 29)
use_collision = true
size = Vector3(4, 3, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/Mantles" unique_id=2050446324]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 1.5, 30)
use_collision = true
size = Vector3(4, 3, 4)
material = ExtResource("3_vvhq3")
[node name="Label3D33" type="Label3D" parent="Greybox/Mantles" unique_id=437224967]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 36.5)
text = "4m"
[node name="Label3D34" type="Label3D" parent="Greybox/Mantles" unique_id=1883460159]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 36.5)
text = "4m"
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1685845188]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 36.5)
use_collision = true
size = Vector3(4, 4, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1338959967]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 2, 36.25)
use_collision = true
size = Vector3(3, 4, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D53" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1194447690]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 0.5, 12.125)
use_collision = true
size = Vector3(3, 1, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D57" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1186673858]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -13, 3.5, -21.629175)
use_collision = true
size = Vector3(5, 1, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D54" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1895250071]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 1, 20.125)
use_collision = true
size = Vector3(3, 2, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D55" type="CSGBox3D" parent="Greybox/Mantles" unique_id=141610439]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 1.5, 28.125)
use_collision = true
size = Vector3(3, 3, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D56" type="CSGBox3D" parent="Greybox/Mantles" unique_id=343197184]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 2, 36.125)
use_collision = true
size = Vector3(3, 4, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D50" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1273139469]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 36.75)
use_collision = true
size = Vector3(4, 4, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D51" type="CSGBox3D" parent="Greybox/Mantles" unique_id=1688782002]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 2, 37)
use_collision = true
size = Vector3(4, 4, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D52" type="CSGBox3D" parent="Greybox/Mantles" unique_id=443302723]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 2, 38)
use_collision = true
size = Vector3(4, 4, 4)
material = ExtResource("3_vvhq3")

View File

@@ -49,16 +49,8 @@ public partial class MainSceneTemplate : Node3D, IProvide<InventoryManager>, IPr
if (InitialWeaponInventory != null)
InventoryManager.InitializeFromResource(InitialWeaponInventory);
AddChild(InventoryManager);
this.Provide();
}
public void OnProvided()
{
// You can optionally implement this method. It gets called once you call
// this.Provide() to inform AutoInject that the provided values are now
// available.
}
public void ResetPlayerPosition()
{

View File

@@ -8,12 +8,8 @@
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="4_jaqjx"]
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="5_iq67o"]
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="6_l44fp"]
[ext_resource type="Resource" uid="uid://bohbojc68j7y1" path="res://scenes/enemies/grounded_enemy/grounded_enemy_health.tres" id="7_ucbss"]
[ext_resource type="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="8_2brdd"]
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="9_4vdsh"]
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="10_levmk"]
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="11_5jlg7"]
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="12_pjgox"]
[ext_resource type="PackedScene" uid="uid://qup00a7x2sji" path="res://scenes/fixed_dash_target/fixed_dashthrough_target.tscn" id="13_iq67o"]
[ext_resource type="PackedScene" uid="uid://b8aet6m4m2i83" path="res://scenes/tuto_trigger/TutoTrigger.tscn" id="14_lthgu"]
@@ -22,6 +18,9 @@ script = ExtResource("3_nix1q")
OnWeaponStartedFlyingAbilities = Array[Object]([ExtResource("2_ctafv")])
OnWeaponFlyingTickAbilities = Array[Object]([ExtResource("2_ctafv")])
OnWeaponStoppedFlyingAbilities = Array[Object]([ExtResource("2_ctafv")])
OnWeaponStartedPlantedAbilities = null
OnWeaponPlantedTickAbilities = null
OnWeaponStoppedPlantedAbilities = null
metadata/_custom_type_script = "uid://cgaahnfgxcrr6"
[sub_resource type="BoxShape3D" id="BoxShape3D_lthgu"]
@@ -42,8 +41,6 @@ material = ExtResource("3_1qo78")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.5, 1, -42.5)
EnemyToSpawn = ExtResource("5_iq67o")
MovementInputs = ExtResource("6_l44fp")
HealthInputs = ExtResource("7_ucbss")
DamageInputs = ExtResource("8_2brdd")
Target = NodePath("../Player")
SpawnInterval = 1.808
@@ -51,8 +48,6 @@ SpawnInterval = 1.808
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 46.5, 11.5, -34.5)
EnemyToSpawn = ExtResource("5_iq67o")
MovementInputs = ExtResource("6_l44fp")
HealthInputs = ExtResource("7_ucbss")
DamageInputs = ExtResource("8_2brdd")
Target = NodePath("../Player")
SpawnInterval = 5.0
IsActiveOnStart = false
@@ -61,8 +56,6 @@ IsActiveOnStart = false
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 44.5, 0, -3)
EnemyToSpawn = ExtResource("5_iq67o")
MovementInputs = ExtResource("6_l44fp")
HealthInputs = ExtResource("7_ucbss")
DamageInputs = ExtResource("8_2brdd")
Target = NodePath("../Player")
SpawnInterval = 5.0
@@ -70,8 +63,6 @@ SpawnInterval = 5.0
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.5, 19, -19.5)
EnemyToSpawn = ExtResource("9_4vdsh")
MovementInputs = ExtResource("10_levmk")
HealthInputs = ExtResource("11_5jlg7")
DamageInputs = ExtResource("12_pjgox")
Target = NodePath("../Player")
SpawnInterval = 5.0
@@ -79,8 +70,6 @@ SpawnInterval = 5.0
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 45.5, 25.5, -42.5)
EnemyToSpawn = ExtResource("9_4vdsh")
MovementInputs = ExtResource("10_levmk")
HealthInputs = ExtResource("11_5jlg7")
DamageInputs = ExtResource("12_pjgox")
Target = NodePath("../Player")
SpawnInterval = 5.0

View File

@@ -5,44 +5,18 @@
[ext_resource type="PackedScene" uid="uid://qup00a7x2sji" path="res://scenes/fixed_dash_target/fixed_dashthrough_target.tscn" id="3_j13fh"]
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="4_1cb4f"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="5_vuwkd"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="6_251oa"]
[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="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="10_jadgc"]
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="11_luuoi"]
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="12_4nug6"]
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="13_e04qc"]
[sub_resource type="Resource" id="Resource_xixm3"]
script = ExtResource("5_vuwkd")
GravityModifier = 5.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
[sub_resource type="Resource" id="Resource_p48l4"]
script = ExtResource("6_251oa")
StartingHealth = 1000.0
metadata/_custom_type_script = "uid://baiapod3csndf"
[sub_resource type="Resource" id="Resource_epn1o"]
script = ExtResource("6_251oa")
StartingHealth = 1.0
metadata/_custom_type_script = "uid://baiapod3csndf"
[node name="Main" unique_id=1551129541 instance=ExtResource("1_qu1jn")]
[node name="BackgroundMusicPlayer" parent="." index="0" unique_id=879496303]
autoplay = false
[node name="Player" parent="." index="5" unique_id=1309399929]
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 2, 1.5, 9.5)
[node name="DebugLayer" parent="." index="6" unique_id=294370189]
visible = true
[node name="GuideDebugger" parent="DebugLayer" index="0" unique_id=636020765]
visible = false
[node name="Greybox" type="CSGCombiner3D" parent="." index="7" unique_id=646927976]
use_collision = true
collision_layer = 256
@@ -124,7 +98,6 @@ RMovement = SubResource("Resource_xixm3")
[node name="Enemy3" parent="." index="11" unique_id=271578597 node_paths=PackedStringArray("Target") instance=ExtResource("4_1cb4f")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 4, -3.3368092)
Target = NodePath("../Player")
RHealth = SubResource("Resource_p48l4")
RMovement = SubResource("Resource_xixm3")
[node name="FlyingEnemy" parent="." index="12" unique_id=1167959205 node_paths=PackedStringArray("Target") instance=ExtResource("7_vkl5g")]
@@ -141,8 +114,6 @@ RMovement = SubResource("Resource_xixm3")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2.5, -15)
EnemyToSpawn = ExtResource("4_1cb4f")
MovementInputs = ExtResource("9_ynw2y")
HealthInputs = SubResource("Resource_epn1o")
DamageInputs = ExtResource("10_jadgc")
Target = NodePath("../Player")
IsActiveOnStart = false
@@ -150,7 +121,8 @@ IsActiveOnStart = false
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 11, -14)
EnemyToSpawn = ExtResource("7_vkl5g")
MovementInputs = ExtResource("11_luuoi")
HealthInputs = ExtResource("12_4nug6")
DamageInputs = ExtResource("13_e04qc")
Target = NodePath("../Player")
IsActiveOnStart = false
[node name="Player" parent="." index="17" unique_id=1309399929]
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 2, 1.5, 9.5)

View File

@@ -14,6 +14,11 @@ using Movementtests.systems;
public partial class InventoryUi : Control, IDisposable
{
public override void _Notification(int what) => this.Notify(what);
public record struct EventElements(
AbilitySelection AbilitySelection,
AutoSet<ForgeAbilityBehavior>.Binding Binding,
IAutoSet<ForgeAbilityBehavior> Inventory);
#region Dependencies
[Dependency]
@@ -27,53 +32,67 @@ public partial class InventoryUi : Control, IDisposable
public required AbilitySelection WhileFlying { get; set; }
[Node]
public required AbilitySelection StoppedFlying { get; set; }
[Node]
public required AbilitySelection StartedPlanted { get; set; }
[Node]
public required AbilitySelection WhilePlanted { get; set; }
[Node]
public required AbilitySelection StoppedPlanted { get; set; }
#endregion Nodes
public AutoSet<ForgeAbilityBehavior>.Binding StartedFlyingBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding FlyingTickBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding StoppedFlyingBinding { get; set; }
public required AutoSet<ForgeAbilityBehavior>.Binding StartedFlyingBinding { get; set; }
public required AutoSet<ForgeAbilityBehavior>.Binding FlyingTickBinding { get; set; }
public required AutoSet<ForgeAbilityBehavior>.Binding StoppedFlyingBinding { get; set; }
public required AutoSet<ForgeAbilityBehavior>.Binding StartedPlantedBinding { get; set; }
public required AutoSet<ForgeAbilityBehavior>.Binding PlantedTickBinding { get; set; }
public required AutoSet<ForgeAbilityBehavior>.Binding StoppedPlantedBinding { get; set; }
public Dictionary<WeaponSystem.WeaponEvent, EventElements> EventElementsMap { get; private set; } = [];
public void OnReady()
{
StartedFlying.AbilityAdded += AddAbilityForEvent;
WhileFlying.AbilityAdded += AddAbilityForEvent;
StoppedFlying.AbilityAdded += AddAbilityForEvent;
StartedFlying.AbilityRemoved += RemoveAbilityForEvent;
WhileFlying.AbilityRemoved += RemoveAbilityForEvent;
StoppedFlying.AbilityRemoved += RemoveAbilityForEvent;
}
public void OnResolved()
{
StartedFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.StartedFlying]);
WhileFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick]);
StoppedFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.StoppedFlying]);
EventElementsMap = new Dictionary<WeaponSystem.WeaponEvent, EventElements>
{
{ WeaponSystem.WeaponEvent.StartedFlying, new EventElements(StartedFlying, StartedFlyingBinding, InventoryManager.StartedFlyingAbilities) },
{ WeaponSystem.WeaponEvent.StoppedFlying, new EventElements(StoppedFlying, StoppedFlyingBinding, InventoryManager.StoppedFlyingAbilities)},
{ WeaponSystem.WeaponEvent.FlyingTick, new EventElements(WhileFlying, FlyingTickBinding, InventoryManager.FlyingTickAbilities) },
{ WeaponSystem.WeaponEvent.StartedPlanted, new EventElements(StartedPlanted, StartedPlantedBinding, InventoryManager.StartedPlantedAbilities) },
{ WeaponSystem.WeaponEvent.StoppedPlanted, new EventElements(StoppedPlanted, StoppedPlantedBinding, InventoryManager.StoppedPlantedAbilities) },
{ WeaponSystem.WeaponEvent.PlantedTick, new EventElements(WhilePlanted, PlantedTickBinding, InventoryManager.PlantedTickAbilities) },
};
StartedFlyingBinding = InventoryManager.StartedFlyingAbilities.Bind();
StartedFlyingBinding
.OnAdd(behavior => OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent.StartedFlying, behavior))
.OnRemove(behavior => OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent.StartedFlying, behavior))
.OnClear(() => OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent.StartedFlying));
FlyingTickBinding = InventoryManager.FlyingTickAbilities.Bind();
FlyingTickBinding
.OnAdd(behavior => OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent.FlyingTick, behavior))
.OnRemove(behavior => OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent.FlyingTick, behavior))
.OnClear(() => OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent.FlyingTick));
StoppedFlyingBinding = InventoryManager.StoppedFlyingAbilities.Bind();
StoppedFlyingBinding
.OnAdd(behavior => OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent.StoppedFlying, behavior))
.OnRemove(behavior => OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent.StoppedFlying, behavior))
.OnClear(() => OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent.StoppedFlying));
foreach (var (forEvent, element) in EventElementsMap)
{
element.AbilitySelection.AbilityAdded += AddAbilityForEvent;
element.AbilitySelection.AbilityRemoved += RemoveAbilityForEvent;
var elem = EventElementsMap[forEvent];
elem.AbilitySelection.Initialize(InventoryManager.WeaponEventsInventory[forEvent]);
elem.Binding = element.Inventory.Bind();
elem.Binding
.OnAdd(behavior => OnWeaponEventInventoryAdded(forEvent, behavior))
.OnRemove(behavior => OnWeaponEventInventoryRemoved(forEvent, behavior))
.OnClear(() => OnWeaponEventInventoryCleared(forEvent));
}
foreach (var forEvent in EventElementsMap.Keys)
{
}
}
public new void Dispose()
{
GC.SuppressFinalize(this);
StartedFlying.Dispose();
WhileFlying.Dispose();
StoppedFlying.Dispose();
foreach (var element in EventElementsMap.Values)
element.Binding.Dispose();
base.Dispose();
}
@@ -108,13 +127,6 @@ public partial class InventoryUi : Control, IDisposable
public AbilitySelection GetAbilitySelection(WeaponSystem.WeaponEvent forEvent)
{
var abilitiesSelectionsMap = new Dictionary<WeaponSystem.WeaponEvent, AbilitySelection>
{
{ WeaponSystem.WeaponEvent.StartedFlying, StartedFlying },
{ WeaponSystem.WeaponEvent.StoppedFlying, StoppedFlying },
{ WeaponSystem.WeaponEvent.FlyingTick, WhileFlying },
};
return abilitiesSelectionsMap[forEvent];
return EventElementsMap[forEvent].AbilitySelection;
}
}

View File

@@ -72,24 +72,47 @@ layout_mode = 2
text = "Weapon abilities"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection" unique_id=75337901]
[node name="FlyingHBoxContainer" type="HBoxContainer" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection" unique_id=75337901]
layout_mode = 2
script = ExtResource("2_ijoei")
search_depth = 10
[node name="StartedFlying" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/HBoxContainer" unique_id=1373426933 instance=ExtResource("3_ijoei")]
[node name="StartedFlying" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/FlyingHBoxContainer" unique_id=1373426933 instance=ExtResource("3_ijoei")]
unique_name_in_owner = true
layout_mode = 2
Title = "Started flying"
[node name="WhileFlying" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/HBoxContainer" unique_id=1771285257 instance=ExtResource("3_ijoei")]
[node name="WhileFlying" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/FlyingHBoxContainer" unique_id=1771285257 instance=ExtResource("3_ijoei")]
unique_name_in_owner = true
layout_mode = 2
ForEvent = 2
Title = "While flying"
[node name="StoppedFlying" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/HBoxContainer" unique_id=324047638 instance=ExtResource("3_ijoei")]
[node name="StoppedFlying" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/FlyingHBoxContainer" unique_id=324047638 instance=ExtResource("3_ijoei")]
unique_name_in_owner = true
layout_mode = 2
ForEvent = 1
Title = "Stopped flying"
[node name="PlantedHBoxContainer" type="HBoxContainer" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection" unique_id=1198840955]
layout_mode = 2
script = ExtResource("2_ijoei")
search_depth = 10
[node name="StartedPlanted" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/PlantedHBoxContainer" unique_id=1231817717 instance=ExtResource("3_ijoei")]
unique_name_in_owner = true
layout_mode = 2
ForEvent = 3
Title = "On weapon planted"
[node name="WhilePlanted" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/PlantedHBoxContainer" unique_id=1222663623 instance=ExtResource("3_ijoei")]
unique_name_in_owner = true
layout_mode = 2
ForEvent = 5
Title = "While planted"
[node name="StoppedPlanted" parent="Inventory/MenuPanelContainer/MarginContainer/BoxContainer/PlayerSectionMargin/PlayerSection/PlantedHBoxContainer" unique_id=2136675723 instance=ExtResource("3_ijoei")]
unique_name_in_owner = true
layout_mode = 2
ForEvent = 4
Title = "On weapon unplanted"

View File

@@ -26,7 +26,6 @@ public partial class Enemy : CharacterBody3D,
ISpawnable,
IKnockbackable,
ITargetable,
IStunnable,
IForgeEntity
{
public override void _Notification(int what) => this.Notify(what);
@@ -166,7 +165,7 @@ public partial class Enemy : CharacterBody3D,
public void ProcessGameplay(double delta)
{
if (IsStunned || _hitAbilityHandle == null) return;
if (_hitAbilityHandle == null) return;
var bodies = DamageBox.GetOverlappingBodies();
foreach (var body in bodies)
@@ -186,16 +185,16 @@ public partial class Enemy : CharacterBody3D,
public void OnDamageReceived(EventData<DamageDone> data)
{
var source = data.Source as Node;
var sourceName = source?.Name ?? "unknown damage dealer";
GD.Print($"Ouch! Fuck you {sourceName}!");
if (data.Payload.OverkillDamage > 0) GD.Print($"Overkill! {data.Payload.OverkillDamage} damage");
// var source = data.Source as Node;
// var sourceName = source?.Name ?? "unknown damage dealer";
// GD.Print($"Ouch! Fuck you {sourceName}!");
// if (data.Payload.OverkillDamage > 0) GD.Print($"Overkill! {data.Payload.OverkillDamage} damage");
}
private void OnHealthChanged(EntityAttribute healthAttribute, int i)
{
if (healthAttribute.CurrentValue > healthAttribute.Min) return;
Events.Raise(new EventData
{
EventTags = Tag.RequestTag(TagsManager, "events.combat.death").GetSingleTagContainer()!
@@ -213,13 +212,11 @@ public partial class Enemy : CharacterBody3D,
// Remove weapon that might be planted there
foreach (var child in GetChildren())
{
if (child is WeaponSystem system)
{
CallDeferred(Node.MethodName.RemoveChild, system);
GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, system);
system.CallDeferred(Node3D.MethodName.SetGlobalPosition, GlobalPosition + Vector3.Up*EnemyHeight);
system.CallDeferred(WeaponSystem.MethodName.RethrowWeapon);
}
if (child is not WeaponSystem system) continue;
CallDeferred(Node.MethodName.RemoveChild, system);
GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, system);
system.CallDeferred(Node3D.MethodName.SetGlobalPosition, GlobalPosition + Vector3.Up*EnemyHeight);
system.CallDeferred(WeaponSystem.MethodName.RethrowWeapon);
}
foreach (var killable in DeathEffects.ToIKillables())
@@ -243,19 +240,4 @@ public partial class Enemy : CharacterBody3D,
{
return TargetComponent.GlobalPosition;
}
// Stun management
public bool IsStunned { get; set; }
[Export(PropertyHint.Range, "0.1, 2, 0.1, or_greater")]
public float StunDuration { get; set; } = 1f;
public void Stun()
{
IsStunned = true;
GetTree().CreateTimer(StunDuration).Timeout += Unstun;
}
public void Unstun()
{
IsStunned = false;
}
}

View File

@@ -37,6 +37,10 @@ public partial class Explosion : Area3D, IProvide<CuesManager>
public void OnResolved()
{
this.Provide();
}
public void OnProvided()
{
GetTree().CreateTimer(ExplosionTime).Timeout += TriggerExplosion;
}

View File

@@ -60,6 +60,7 @@ collision_layer = 0
collision_mask = 16
monitorable = false
script = ExtResource("1_82hkh")
Damage = 20.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1259903749]
shape = SubResource("SphereShape3D_82hkh")

View File

@@ -3,7 +3,7 @@ using System;
using Movementtests.interfaces;
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_target.png")]
public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, IStunnable
public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, IDisableable
{
public Vector3 GetTargetGlobalPosition()
{
@@ -16,15 +16,15 @@ public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, ISt
_defaultCollisionMask = CollisionMask;
}
public bool IsStunned { get; set; }
public float StunDuration { get; set; } = 0.1f;
public void Stun()
public bool IsDisabled { get; set; }
public float DisableDuration { get; set; } = 0.1f;
public void Disable()
{
_defaultCollisionMask = 0;
GetTree().CreateTimer(StunDuration).Timeout += Unstun;
GetTree().CreateTimer(DisableDuration).Timeout += Enable;
}
public void Unstun()
public void Enable()
{
_defaultCollisionMask = CollisionMask;
}

View File

@@ -49,7 +49,10 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
{
StartedFlying,
StoppedFlying,
FlyingTick
FlyingTick,
StartedPlanted,
StoppedPlanted,
PlantedTick
}
#endregion
@@ -70,6 +73,10 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStoppedFlyingAbilities = new();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponFlyingTickAbilities = new();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStartedPlantedAbilities = new();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStoppedPlantedAbilities = new();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponPlantedTickAbilities = new();
public Tag WeaponFlyingTickEventTag;
public Tag WeaponStartedFlyingEventTag;
public Tag WeaponStoppedFlyingEventTag;
@@ -78,24 +85,31 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
public Tag WeaponPlantedToHandEventTag;
public Tag WeaponPlantedToFlyingEventTag;
public Tag WeaponPlantedEventTag;
public Tag WeaponPlantedTickEventTag;
public Tag WeaponUnplantedEventTag;
public Tag WeaponInHandStatusTag;
public Tag WeaponFlyingStatusTag;
public Tag WeaponPlantedStatusTag;
public Tag WeaponFlyingAbilityTag;
public Tag WeaponPlantedAbilityTag;
private AbilityHandle? _weaponFlyingAbility;
private AbilityHandle? _weaponPlantedAbility;
#endregion
#region Inspector
[Export] public ForgeAbilityData? FlyingTickAbility { get; set; }
[ExportGroup("Throwing")]
[Export(PropertyHint.Range, "0,2,0.01,or_greater")]
public float ThrowForce { get; set; } = 1f;
[Export(PropertyHint.Range, "0,0.2,0.01,or_greater")]
public float StraightThrowDuration { get; set; } = 0.1f;
[ExportGroup("Tick raising abilities")]
[Export] public ForgeAbilityData? FlyingTickAbility { get; set; }
[Export] public ForgeAbilityData? PlantedTickAbility { get; set; }
#endregion
@@ -168,6 +182,9 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
private Vector3 _startMeshRotation;
private Vector3 _throwDirection;
private IForgeEntity? _plantedEntity;
private AbilityHandle? _plantedInEnemyHandle;
#endregion
@@ -208,22 +225,33 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
WeaponPlantedToHandEventTag = Tag.RequestTag(TagsManager, "events.weapon.plantedToHand");
WeaponPlantedToFlyingEventTag = Tag.RequestTag(TagsManager, "events.weapon.plantedToFlying");
WeaponPlantedEventTag = Tag.RequestTag(TagsManager, "events.weapon.planted");
WeaponPlantedTickEventTag = Tag.RequestTag(TagsManager, "events.weapon.plantedtick");
WeaponUnplantedEventTag = Tag.RequestTag(TagsManager, "events.weapon.unplanted");
// WeaponInHandStatusTag = Tag.RequestTag(TagsManager, "status.weapon.inHand");
// WeaponFlyingStatusTag = Tag.RequestTag(TagsManager, "status.weapon.flying");
// WeaponPlantedStatusTag = Tag.RequestTag(TagsManager, "status.weapon.planted");
// Manage weapon flying tick raising ability
WeaponFlyingAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.flying");
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
// 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(); });
}
#region EventRaising
BodyEntered += OnThrownWeaponReachesGround;
InHandState.StateExited += WeaponLeft;
InHandState.StateEntered += WeaponBack;
#region EventRaising
_handToFlying.Taken += () =>
{
Events.Raise(new EventData
@@ -257,7 +285,15 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
Events.Raise(new EventData
{
EventTags = WeaponPlantedToHandEventTag.GetSingleTagContainer()!,
Source = this
Source = this,
Target = _plantedEntity
});
Events.Raise(new EventData
{
EventTags = WeaponUnplantedEventTag.GetSingleTagContainer()!,
Source = this,
Target = _plantedEntity
});
};
@@ -273,6 +309,12 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
EventTags = WeaponStartedFlyingEventTag.GetSingleTagContainer()!,
Source = this
});
Events.Raise(new EventData
{
EventTags = WeaponUnplantedEventTag.GetSingleTagContainer()!,
Source = this,
Target = _plantedEntity
});
};
_toPlanted.Taken += () =>
@@ -303,6 +345,9 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
{ WeaponEvent.StartedFlying, WeaponStartedFlyingEventTag },
{ WeaponEvent.StoppedFlying, WeaponStoppedFlyingEventTag },
{ WeaponEvent.FlyingTick, WeaponFlyingTickEventTag },
{ WeaponEvent.StartedPlanted, WeaponPlantedEventTag },
{ WeaponEvent.StoppedPlanted, WeaponUnplantedEventTag },
{ WeaponEvent.PlantedTick, WeaponPlantedTickEventTag },
};
var ability = new AbilityData(
@@ -362,6 +407,10 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
{ WeaponEvent.StartedFlying, _grantedWeaponStartedFlyingAbilities },
{ WeaponEvent.StoppedFlying, _grantedWeaponStoppedFlyingAbilities },
{ WeaponEvent.FlyingTick, _grantedWeaponFlyingTickAbilities },
{ WeaponEvent.StartedPlanted, _grantedWeaponStartedPlantedAbilities },
{ WeaponEvent.StoppedPlanted, _grantedWeaponStoppedPlantedAbilities },
{ WeaponEvent.PlantedTick, _grantedWeaponPlantedTickAbilities },
};
return abilitiesMap[forEvent];
@@ -409,7 +458,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
tween.Finished += ThrowWeaponOnCurve;
}
private IForgeEntity? _plantedEntity;
public void PlantInEnemy(Node3D enemy)
{
GetTree().GetRoot().CallDeferred(Node.MethodName.RemoveChild, this);
@@ -417,11 +465,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
if (enemy is IForgeEntity victim) _plantedEntity = victim;
else _plantedEntity = null;
// if (enemy is IDamageable damageable)
// {
// damageable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
// }
}
public void RethrowWeapon()
@@ -470,12 +513,10 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
public override void _IntegrateForces(PhysicsDirectBodyState3D state)
{
base._IntegrateForces(state);
if (!Freeze && state.GetContactCount() > 0)
{
PlantLocation = state.GetContactLocalPosition(0);
PlantNormal = state.GetContactLocalNormal(0);
}
if (Freeze || state.GetContactCount() <= 0) return;
PlantLocation = state.GetContactLocalPosition(0);
PlantNormal = state.GetContactLocalNormal(0);
}
public override void _Process(double delta)

View File

@@ -1,9 +1,11 @@
[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"]
[ext_resource type="Resource" uid="uid://0oo3na61ot1o" path="res://forge/resources/ability_datas/weapon_planted_tick_ability.tres" id="3_7bruw"]
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://forge/resources/ability_datas/weapon_flying_tick_ability.tres" id="4_7bruw"]
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
@@ -11,6 +13,15 @@
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="5_7bruw"]
[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"]
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_vs841"]
[ext_resource type="Resource" uid="uid://bn1getr10b4dx" path="res://forge/resources/effect_datas/simple_player_hit.tres" id="10_fyov3"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="10_rgbou"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="11_fyov3"]
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="12_2o32x"]
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="12_fyov3"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="13_i0iid"]
[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"]
script = ExtResource("2_l1xlx")
@@ -23,6 +34,62 @@ Default = 1
Min = 1
Max = 100
[sub_resource type="Resource" id="Resource_weq0w"]
script = ExtResource("12_2o32x")
DamageEffect = ExtResource("10_fyov3")
Name = "On planted simple hit"
Description = "Causes hit on enemy planted"
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
[sub_resource type="Resource" id="Resource_2o32x"]
script = ExtResource("12_fyov3")
Tag = "events.weapon.planted"
metadata/_custom_type_script = "uid://dpakv7agvir6y"
[sub_resource type="Resource" id="Resource_bua0c"]
script = ExtResource("13_i0iid")
Name = "On Planted in Enemy"
InstancingPolicy = 1
CooldownEffects = []
AbilityBehavior = SubResource("Resource_weq0w")
TriggerSource = 1
TriggerTag = SubResource("Resource_2o32x")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
[sub_resource type="Resource" id="Resource_xhc8e"]
script = ExtResource("10_rgbou")
BaseValue = 1
[sub_resource type="Resource" id="Resource_hnni7"]
script = ExtResource("14_i0jsb")
AbilityData = SubResource("Resource_bua0c")
AbilityLevel = SubResource("Resource_xhc8e")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_rr8s3"]
script = ExtResource("15_a8u16")
GrantAbilityConfigs = [SubResource("Resource_hnni7")]
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
[sub_resource type="Resource" id="Resource_8jrha"]
script = ExtResource("10_rgbou")
BaseValue = 1
[sub_resource type="Resource" id="Resource_l026a"]
script = ExtResource("10_rgbou")
BaseValue = 1
[sub_resource type="Resource" id="Resource_x33lk"]
script = ExtResource("11_fyov3")
Name = "Grant abilities"
Modifiers = []
Components = Array[Object]([SubResource("Resource_rr8s3")])
Executions = []
StackLimit = SubResource("Resource_l026a")
InitialStack = SubResource("Resource_8jrha")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="CylinderShape3D" id="CylinderShape3D_avini"]
height = 1.0
radius = 0.1
@@ -58,7 +125,9 @@ 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")
@@ -73,6 +142,11 @@ InitialAttributeValues = Dictionary[String, ExtResource("4_q6xv7")]({
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="GrantAbilities" type="Node" parent="ForgeEntityNode" unique_id=180593118]
script = ExtResource("9_vs841")
EffectData = SubResource("Resource_x33lk")
metadata/_custom_type_script = "uid://dps0oef50noil"
[node name="WeaponFlyingTick" type="Timer" parent="." unique_id=656309486]
wait_time = 0.2

View File

@@ -1,470 +0,0 @@
using System;
using Godot;
namespace Movementtests.player_controller.Scripts;
public partial class HealthSystem : Node3D
{
new enum Rotation
{
NoRotation = 0,
CameraRotationTriggered = 1,
RotatingOnZAxis = 2,
ReturningBack = 3,
}
[ExportGroup("Health Metrics")]
[ExportSubgroup("Amounts")]
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
public float MaxHealth { get; set; } = 100.0f;
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
public float CurrentHealth { get; set; } = 100.0f;
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
public float MinimalDamageUnit { get; set; } = 25.0f;
[Export(PropertyHint.Range, "-100,0,0.1,or_smaller")]
public float ThresholdVelYForDamage { get; set; } = -15.0f;
[ExportSubgroup("Regeneration")]
[Export(PropertyHint.Range, "0,10,0.01,suffix:s,or_greater")]
public float SecondsBeforeRegeneration { get; set; } = 5.5f;
[Export(PropertyHint.Range, "0,10,0.01,or_greater")]
public float RegenerationSpeed { get; set; } = 10.0f;
[ExportGroup("Damage Camera Effects")]
[ExportSubgroup("Camera Shake")]
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
public float RotationSpeed { get; set; } = 9.0f;
[Export(PropertyHint.Range, "0,180,0.1,degrees")]
public float RotationDegree { get; set; } = 14.0f;
[ExportSubgroup("Visual Distortion")]
// Screen darkness controls how dark the screen will be, where 0.0 - natural
// color of the screen(unaltered) and 1.0 - black screen
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float ScreenDarknessMin { get; set; } = 0.0f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float ScreenDarknessMax { get; set; } = 0.3f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float DistortionSpeedMin { get; set; } = 0.0f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float DistortionSpeedMax { get; set; } = 0.6f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float DistortionSizeMin { get; set; } = 0.0f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float DistortionSizeMax { get; set; } = 1.0f;
[ExportSubgroup("Vignetting")]
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float ActiveZoneMultiplierMin { get; set; } = 0.45f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float ActiveZoneMultiplierMax { get; set; } = 0.475f;
[Export(PropertyHint.Range, "0.0,1.0,0.01,or_greater")]
public float MultiplierDeltaForAnimation { get; set; } = 0.066f;
[Export(PropertyHint.Range, "0.0,1.0,0.01")]
public float Softness { get; set; } = 1.0f;
[Export(PropertyHint.Range, "0.0,10,0.01")]
public float SpeedMin { get; set; } = 2.95f;
[Export(PropertyHint.Range, "0.0,10,0.01")]
public float SpeedMax { get; set; } = 4.0f;
// Death / GameOver
[ExportGroup("Death")]
[ExportSubgroup("Before Fade Out")]
[Export(PropertyHint.Range, "0,1,0.01,or_less,or_greater")]
public float BlurLimitValueToStartFadeOut { get; set; } = 0.3f;
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
public float BlurValueToStartFadeOut { get; set; } = 3.376f;
[ExportSubgroup("Speeds")]
[Export(PropertyHint.Range, "0.1,20.0,0.1,or_greater")]
public float CameraDropSpeedOnDeath { get; set; } = 18.0f;
[Export(PropertyHint.Range, "0.01,5.0,0.01,or_greater")]
public float FadeOutSpeed { get; set; } = 0.11f;
[Export(PropertyHint.Range, "0.1,10,0.01,or_greater")]
public float BlurLimitSpeedOnDeath { get; set; } = 0.9f;
[Export(PropertyHint.Range, "0.1,10,0.01,or_greater")]
public float BlurSpeedOnDeath { get; set; } = 1.5f;
[ExportSubgroup("Target values")]
[Export(PropertyHint.Range, "0,5.0,0.01,suffix:m,or_greater")]
public float CameraHeightOnDeath { get; set; } = 0.68f;
[Export(PropertyHint.Range, "0,5.0,0.01,suffix:m,or_greater")]
public float FadeOutTargetValue { get; set; } = 4.0f;
// TODO: add setter: BlurLimitValueToStartFadeOut should always be less than BlurLimitTargetValue
// (control it in editor)
[Export(PropertyHint.Range, "0,10,0.01,or_greater")]
public float BlurLimitTargetValue { get; set; } = 0.5f;
// TODO: add setter: BlurValueToStartFadeOut should always be less than BlurTargetValue
// (control it in editor)
[Export(PropertyHint.Range, "0,10,0.01,or_greater")]
public float BlurTargetValue { get; set; } = 7.0f;
[ExportSubgroup("Other")]
[Export(PropertyHint.Range, "0.0,4.0,0.01,suffix:s,or_greater")]
public float ScreenDarknessToReloadScene { get; set; } = 1.74f;
// Required to hide Vignette effect
private float _currentHealthInPrevFrame;
private float _currentVelocityYInAir;
private CharacterBody3D _characterBody3D;
private Camera3D _camera;
private float _cameraInitialRotationZ;
private float _targetRotationZAxis;
private Rotation _cameraRotation = Rotation.NoRotation;
private float _progressOnCamRotation;
private Vector2 _uvOffset = Vector2.Zero;
private float _offsetResetThreshold = 5.0f;
private ShaderMaterial _distortionMaterial;
private float _timeAccumulator;
private float _currentSpeed;
private const float InitialMultiplierMidVal = 0.6f;
private const float MultiplierMidValToHideVignette = 0.8f;
private float _currentMultiplierMidValue;
private ShaderMaterial _vignetteMaterial;
private bool _deathAnimationPlayed;
private float _screenDarknessOnDeath;
private float _currentBlurLimit;
private float _currentBlur;
private float _currentScreenDarkness;
private bool _dead;
private Node3D _head;
private ShaderMaterial _blurMaterial;
public struct HealthSystemInitParams
{
public CharacterBody3D Parent;
public Camera3D Camera;
public Node3D Head;
}
public void Init(HealthSystemInitParams initParams)
{
_currentHealthInPrevFrame = CurrentHealth;
_currentMultiplierMidValue = InitialMultiplierMidVal;
_currentSpeed = SpeedMin;
_characterBody3D = initParams.Parent;
_camera = initParams.Camera;
_head = initParams.Head;
// Resetting shaders' parameters
_vignetteMaterial.SetShaderParameter(Constants.VIGNETTE_SHADER_MULTIPLIER, 1.0f);
_vignetteMaterial.SetShaderParameter(Constants.VIGNETTE_SHADER_SOFTNESS, 1.0f);
_distortionMaterial.SetShaderParameter(Constants.DISTORTION_SHADER_SCREEN_DARKNESS, 0.0f);
_distortionMaterial.SetShaderParameter(Constants.DISTORTION_SHADER_DARKNESS_PROGRESSION, 0.0f);
_distortionMaterial.SetShaderParameter(
Constants.DISTORTION_SHADER_UV_OFFSET, new Vector2(0.0f, 0.0f));
_distortionMaterial.SetShaderParameter(Constants.DISTORTION_SHADER_SIZE, 0.0);
_blurMaterial.SetShaderParameter(Constants.BLUR_SHADER_LIMIT, 0.0f);
_blurMaterial.SetShaderParameter(Constants.BLUR_SHADER_BLUR, 0.0f);
}
public override void _Process(double delta)
{
float deltaConverted = (float)delta;
HandleDeath(deltaConverted);
HandleVignetteShader(deltaConverted);
HandleDistortionShader(deltaConverted);
HandleCameraRotationOnHit(deltaConverted);
HandleDamageOnFall();
HandleHealthRegeneration(deltaConverted);
}
public void TakeDamage(float amount)
{
if (_dead)
{
return;
}
if (_cameraRotation == Rotation.NoRotation)
{
_cameraRotation = Rotation.CameraRotationTriggered;
}
CurrentHealth -= amount;
CurrentHealth = Mathf.Clamp(CurrentHealth, 0, MaxHealth);
if (CurrentHealth == 0)
{
_dead = true;
return;
}
_lastHitTime = DateTime.UtcNow;
}
public float GetCurrentHealth() { return CurrentHealth; }
#if DEBUG
public override void _UnhandledInput(InputEvent @event)
{
if (@event is InputEventKey eventKey)
if (eventKey.Pressed && eventKey.Keycode == Key.H)
TakeDamage(MinimalDamageUnit);
}
#endif
public bool IsDead() { return _dead; }
private void HandleDeath(float delta)
{
if (!_dead) { return; }
if (!_deathAnimationPlayed)
{
_deathAnimationPlayed = true;
}
Vector3 newPosition = _head.Position;
newPosition.Y = Mathf.Lerp(newPosition.Y, CameraHeightOnDeath, CameraDropSpeedOnDeath * delta);
if (newPosition.Y < CameraHeightOnDeath) { newPosition.Y = CameraHeightOnDeath; }
_head.Position = newPosition;
_currentBlurLimit = Mathf.Lerp(
_currentBlurLimit, BlurLimitTargetValue, BlurLimitSpeedOnDeath * delta);
_blurMaterial.SetShaderParameter(Constants.BLUR_SHADER_LIMIT, _currentBlurLimit);
_currentBlur = Mathf.Lerp(_currentBlur, BlurTargetValue, BlurSpeedOnDeath * delta);
_blurMaterial.SetShaderParameter(Constants.BLUR_SHADER_BLUR, _currentBlur);
if (_currentBlurLimit >= BlurLimitValueToStartFadeOut && _currentBlur >= BlurValueToStartFadeOut)
{
float currentScreenDarknessVariant = (float)_distortionMaterial.GetShaderParameter(
Constants.DISTORTION_SHADER_SCREEN_DARKNESS);
_screenDarknessOnDeath = Mathf.Lerp(
currentScreenDarknessVariant, FadeOutTargetValue, FadeOutSpeed * delta);
_distortionMaterial.SetShaderParameter(
Constants.DISTORTION_SHADER_SCREEN_DARKNESS, _screenDarknessOnDeath);
if (_screenDarknessOnDeath >= ScreenDarknessToReloadScene)
{
GD.Print("reload");
// Reload the current scene
GetTree().ReloadCurrentScene();
}
}
}
private void HandleVignetteShader(float delta)
{
if (Mathf.IsEqualApprox(CurrentHealth, MaxHealth))
{
_currentHealthInPrevFrame = CurrentHealth;
_currentMultiplierMidValue = InitialMultiplierMidVal;
_timeAccumulator = 0;
return;
}
float healthNormalized = CurrentHealth / MaxHealth;
float healthReverted = 1.0f - healthNormalized;
float newAnimationSpeed = Mathf.Lerp(SpeedMin, SpeedMax, healthReverted);
_currentSpeed = Mathf.Lerp(_currentSpeed, newAnimationSpeed, delta);
float completeSinCycle = Mathf.Tau / _currentSpeed;
_timeAccumulator = Mathf.Wrap(_timeAccumulator + delta, 0.0f, completeSinCycle);
float rawAnimationWeight = Mathf.Sin(_timeAccumulator * _currentSpeed);
float animationWeight = Mathf.Abs(rawAnimationWeight);
float difference = _currentHealthInPrevFrame - CurrentHealth;
float newMultiplierMidValue;
if (difference < 0)
{
newMultiplierMidValue = Mathf.Lerp(
MultiplierMidValToHideVignette, ActiveZoneMultiplierMin, healthReverted);
} else
{
newMultiplierMidValue = Mathf.Lerp(
ActiveZoneMultiplierMax, ActiveZoneMultiplierMin, healthReverted);
}
_currentMultiplierMidValue = Mathf.Lerp(
_currentMultiplierMidValue, newMultiplierMidValue, delta);
float multiplier = Mathf.Lerp(
_currentMultiplierMidValue - MultiplierDeltaForAnimation,
_currentMultiplierMidValue + MultiplierDeltaForAnimation,
animationWeight * animationWeight
);
_vignetteMaterial.SetShaderParameter(Constants.VIGNETTE_SHADER_MULTIPLIER, multiplier);
_vignetteMaterial.SetShaderParameter(Constants.VIGNETTE_SHADER_SOFTNESS, Softness);
_currentHealthInPrevFrame = CurrentHealth;
}
private void HandleDistortionShader(float delta)
{
if (Mathf.IsEqualApprox(CurrentHealth, MaxHealth))
{
return;
}
float healthNormalized = CurrentHealth / MaxHealth;
float healthReverted = 1 - healthNormalized;
_distortionMaterial.SetShaderParameter(
Constants.DISTORTION_SHADER_DARKNESS_PROGRESSION, healthReverted);
if (!_dead)
{
float screenDarkness = Mathf.Remap(
healthReverted, 0, 1, ScreenDarknessMin, ScreenDarknessMax);
_distortionMaterial.SetShaderParameter(
Constants.DISTORTION_SHADER_SCREEN_DARKNESS, screenDarkness);
}
float distortionSpeed = Mathf.Remap(
healthReverted, 0.0f, 1.0f, DistortionSpeedMin, DistortionSpeedMax);
float offsetVal = delta * distortionSpeed;
_uvOffset += new Vector2(offsetVal, offsetVal);
_distortionMaterial.SetShaderParameter(
Constants.DISTORTION_SHADER_UV_OFFSET, _uvOffset);
if (_uvOffset.X > _offsetResetThreshold) { _uvOffset.X = 0.0f; _uvOffset.Y = 0.0f; }
float distortionSize = Mathf.Remap(
healthReverted, 0.0f, 1.0f, DistortionSizeMin, DistortionSizeMax);
_distortionMaterial.SetShaderParameter(
Constants.DISTORTION_SHADER_SIZE, distortionSize);
}
private void RotateCameraOnZAxis(float delta, float targetAngleInRadians, Rotation rotationStateToSetOnFinish)
{
_progressOnCamRotation += delta * RotationSpeed;
_progressOnCamRotation = Mathf.Clamp(_progressOnCamRotation, 0f, 1f);
float lerpedAngleZ = Mathf.LerpAngle(
_camera.Rotation.Z,targetAngleInRadians, _progressOnCamRotation);
_camera.Rotation = new Vector3(_camera.Rotation.X, _camera.Rotation.Y, lerpedAngleZ);
float difference = Mathf.Abs(targetAngleInRadians - _camera.Rotation.Z);
if (difference < Constants.ACCEPTABLE_TOLERANCE)
{
_cameraRotation = rotationStateToSetOnFinish;
_progressOnCamRotation = 0;
}
}
private void HandleCameraRotationOnHit(float delta)
{
if (_cameraRotation == Rotation.NoRotation || _dead) return;
if (_cameraRotation == Rotation.CameraRotationTriggered)
{
if (GD.Randi() % 2 == 0)
{
_targetRotationZAxis = Mathf.DegToRad(RotationDegree * -1);
}
else
{
_targetRotationZAxis = Mathf.DegToRad(RotationDegree);
}
_cameraRotation = Rotation.RotatingOnZAxis;
}
if (_cameraRotation == Rotation.RotatingOnZAxis)
{
RotateCameraOnZAxis(delta, _targetRotationZAxis, Rotation.ReturningBack);
}
if (_cameraRotation == Rotation.ReturningBack)
{
RotateCameraOnZAxis(delta, 0, Rotation.NoRotation);
}
}
private void HandleDamageOnFall()
{
if (_dead) { return;}
if (!_characterBody3D.IsOnFloor())
{
_currentVelocityYInAir = _characterBody3D.Velocity.Y;
}
else
{
if (_currentVelocityYInAir < ThresholdVelYForDamage && ThresholdVelYForDamage > 0)
{
float hit = Mathf.Remap(_currentVelocityYInAir,
ThresholdVelYForDamage, ThresholdVelYForDamage - 9.0f,
MinimalDamageUnit, MaxHealth);
GD.Print("Hit damage: ", hit);
TakeDamage(hit);
}
_currentVelocityYInAir = 0.0f;
}
}
private DateTime? _lastHitTime;
private void HandleHealthRegeneration(float delta)
{
if (_lastHitTime == null || _dead) return;
DateTime lastHitTimeConverted = (DateTime)_lastHitTime;
double differenceInSeconds = (DateTime.UtcNow - lastHitTimeConverted).TotalSeconds;
float differenceInSecondsConverted = (float)differenceInSeconds;
if (differenceInSecondsConverted < SecondsBeforeRegeneration)
{
return;
}
if (Mathf.IsEqualApprox(CurrentHealth, MaxHealth))
{
CurrentHealth = MaxHealth;
_lastHitTime = null;
return;
}
CurrentHealth += delta * RegenerationSpeed;
CurrentHealth = Mathf.Clamp(CurrentHealth, 0, MaxHealth);
}
}

View File

@@ -1 +0,0 @@
uid://dv7v1ywmbvvcd

View File

@@ -1,41 +0,0 @@
using System;
using Godot;
namespace Movementtests.player_controller.Scripts;
public partial class Mouse : Node3D
{
[Export(PropertyHint.Range, "0,0.1,0.001,or_greater")]
public float Sensitivity { get; set; } = 0.004f;
private Node3D _head;
private Camera3D _camera;
public delegate bool IsDead();
private IsDead _isPlayerDead;
public void Init(Node3D head, Camera3D cam, IsDead isDeadFunc)
{
Input.SetMouseMode(Input.MouseModeEnum.Captured);
_head = head;
_camera = cam;
_isPlayerDead = isDeadFunc;
}
public void LookAround(Vector2 lookDir)
{
// Horizontal movement of head
float angleForHorizontalRotation = lookDir.X * Sensitivity;
_head.RotateY(angleForHorizontalRotation);
// Vertical movement of head
Vector3 currentCameraRotation = _camera.Rotation;
currentCameraRotation.X += Convert.ToSingle(lookDir.Y * Sensitivity);
currentCameraRotation.X = Mathf.Clamp(currentCameraRotation.X, Mathf.DegToRad(-90f), Mathf.DegToRad(90f));
_camera.Rotation = currentCameraRotation;
}
}

View File

@@ -1 +0,0 @@
uid://c6bx47wr7fbdm

View File

@@ -59,6 +59,10 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
Dash,
MantleDash
}
public record struct EventElements(
AutoSet<ForgeAbilityBehavior>.Binding Binding,
IAutoSet<ForgeAbilityBehavior> Inventory);
#endregion
@@ -110,6 +114,17 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
public required EntityAbilities Abilities { get; set; }
public required EventManager Events { get; set; }
public required Variables SharedVariables { get; set; }
public Dictionary<WeaponSystem.WeaponEvent, AutoSet<ForgeAbilityBehavior>.Binding> EventBindingsMap { get; private set; } = [];
public Dictionary<WeaponSystem.WeaponEvent, IAutoSet<ForgeAbilityBehavior>> EventInventoryMap { get; private set; } = [];
public AutoSet<ForgeAbilityBehavior>.Binding StartedFlyingBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding FlyingTickBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding StoppedFlyingBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding StartedPlantedBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding PlantedTickBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding StoppedPlantedBinding { get; set; }
#endregion
@@ -729,37 +744,44 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
}
// Inventory changes signal binding
StartedFlyingBinding = InventoryManager.StartedFlyingAbilities.Bind();
StartedFlyingBinding
.OnAdd(behavior => WeaponSystem.GrantNewAbilityForEvent(WeaponSystem.WeaponEvent.StartedFlying, behavior))
.OnRemove(behavior => WeaponSystem.RemoveAbilityForEvent(WeaponSystem.WeaponEvent.StartedFlying, behavior))
.OnClear(() => WeaponSystem.RemoveAbilitiesForEvent(WeaponSystem.WeaponEvent.StartedFlying));
FlyingTickBinding = InventoryManager.FlyingTickAbilities.Bind();
FlyingTickBinding
.OnAdd(behavior => WeaponSystem.GrantNewAbilityForEvent(WeaponSystem.WeaponEvent.FlyingTick, behavior))
.OnRemove(behavior => WeaponSystem.RemoveAbilityForEvent(WeaponSystem.WeaponEvent.FlyingTick, behavior))
.OnClear(() => WeaponSystem.RemoveAbilitiesForEvent(WeaponSystem.WeaponEvent.FlyingTick));
StoppedFlyingBinding = InventoryManager.StoppedFlyingAbilities.Bind();
StoppedFlyingBinding
.OnAdd(behavior => WeaponSystem.GrantNewAbilityForEvent(WeaponSystem.WeaponEvent.StoppedFlying, behavior))
.OnRemove(behavior => WeaponSystem.RemoveAbilityForEvent(WeaponSystem.WeaponEvent.StoppedFlying, behavior))
.OnClear(() => WeaponSystem.RemoveAbilitiesForEvent(WeaponSystem.WeaponEvent.StoppedFlying));
EventBindingsMap = new Dictionary<WeaponSystem.WeaponEvent, AutoSet<ForgeAbilityBehavior>.Binding>
{
{ WeaponSystem.WeaponEvent.StartedFlying, StartedFlyingBinding },
{ WeaponSystem.WeaponEvent.StoppedFlying, StoppedFlyingBinding },
{ WeaponSystem.WeaponEvent.FlyingTick, FlyingTickBinding },
{ WeaponSystem.WeaponEvent.StartedPlanted, StartedPlantedBinding },
{ WeaponSystem.WeaponEvent.StoppedPlanted, StoppedPlantedBinding },
{ WeaponSystem.WeaponEvent.PlantedTick, PlantedTickBinding },
};
// InventoryManager.WeaponEventAbilityAdded += OnWeaponEventAbilityAdded;
// InventoryManager.WeaponEventAbilityRemoved += OnWeaponEventAbilityRemoved;
EventInventoryMap = new Dictionary<WeaponSystem.WeaponEvent, IAutoSet<ForgeAbilityBehavior>>
{
{ WeaponSystem.WeaponEvent.StartedFlying, InventoryManager.StartedFlyingAbilities },
{ WeaponSystem.WeaponEvent.StoppedFlying, InventoryManager.StoppedFlyingAbilities },
{ WeaponSystem.WeaponEvent.FlyingTick, InventoryManager.FlyingTickAbilities },
{ WeaponSystem.WeaponEvent.StartedPlanted, InventoryManager.StartedPlantedAbilities },
{ WeaponSystem.WeaponEvent.StoppedPlanted, InventoryManager.StoppedPlantedAbilities },
{ WeaponSystem.WeaponEvent.PlantedTick, InventoryManager.PlantedTickAbilities },
};
foreach (var forEvent in EventBindingsMap.Keys)
{
EventBindingsMap[forEvent] = EventInventoryMap[forEvent].Bind();
EventBindingsMap[forEvent]
.OnAdd(behavior => WeaponSystem.GrantNewAbilityForEvent(forEvent, behavior))
.OnRemove(behavior => WeaponSystem.RemoveAbilityForEvent(forEvent, behavior))
.OnClear(() => WeaponSystem.RemoveAbilitiesForEvent(forEvent));
}
}
public AutoSet<ForgeAbilityBehavior>.Binding StartedFlyingBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding FlyingTickBinding { get; set; }
public AutoSet<ForgeAbilityBehavior>.Binding StoppedFlyingBinding { get; set; }
public new void Dispose()
{
GC.SuppressFinalize(this);
StartedFlyingBinding.Dispose();
FlyingTickBinding.Dispose();
StoppedFlyingBinding.Dispose();
foreach (var binding in EventBindingsMap.Values)
binding.Dispose();
base.Dispose();
}
@@ -801,16 +823,6 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
out var failures);
}
public void OnWeaponEventAbilityAdded(WeaponEventAbilityData data)
{
WeaponSystem.GrantNewAbilityForEvent(data.ForEvent, data.Ability);
}
public void OnWeaponEventAbilityRemoved(WeaponEventAbilityData data)
{
WeaponSystem.RemoveAbilityForEvent(data.ForEvent, data.Ability);
}
#endregion
#region Settings
@@ -2327,8 +2339,8 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
_hitEnemies.Add(entity);
TriggerDamage();
}
if (enemy is IStunnable stunnable)
stunnable.Stun();
if (enemy is IDisableable disableable)
disableable.Disable();
}
public void OnWeaponDashFinished()
@@ -2484,9 +2496,9 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
{
TriggerSimpleDashThroughDamage(entity);
}
if (_targetObject is IStunnable stunnable)
if (_targetObject is IDisableable disableable)
{
stunnable.Stun();
disableable.Disable();
}
IsInvincible = false;
_playerState.SendEvent("attack_finished");

View File

@@ -1,40 +0,0 @@
using Godot;
namespace Movementtests.player_controller.Scripts;
public partial class Stamina : Node
{
[Export(PropertyHint.Range, "0,60,0.1,suffix:s,or_greater")]
public float MaxRunTime { get; set; } = 10.0f;
// Regenerate run time multiplier (when run 10s and RunTimeMultiplier = 2.0f to full regenerate you need 5s)
[Export(PropertyHint.Range, "0,10,0.01,or_greater")]
public float RunTimeMultiplier { get; set; } = 2.0f;
private float _currentRunTime;
private float _walkSpeed;
private float _sprintSpeed;
public void SetSpeeds(float walkSpeed, float sprintSpeed)
{
_walkSpeed = walkSpeed;
_sprintSpeed = sprintSpeed;
}
public float AccountStamina(double delta, float wantedSpeed)
{
if (Mathf.Abs(wantedSpeed - _sprintSpeed) > 0.1f)
{
float runtimeLeft = _currentRunTime - (RunTimeMultiplier * (float)delta);
if (_currentRunTime != 0.0f)
_currentRunTime = Mathf.Clamp(runtimeLeft, 0, MaxRunTime);
return wantedSpeed;
}
_currentRunTime = Mathf.Clamp(_currentRunTime + (float) delta, 0, MaxRunTime);
return _currentRunTime >= MaxRunTime ? _walkSpeed : wantedSpeed;
}
}

View File

@@ -1 +0,0 @@
uid://vuq8rjq3vegn