Replicated the weapon flying tick setup using resources
This commit is contained in:
@@ -15,6 +15,7 @@ using Gamesmiths.Forge.Godot.Core;
|
||||
using Gamesmiths.Forge.Godot.Nodes;
|
||||
using Gamesmiths.Forge.Godot.Resources;
|
||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||
using Gamesmiths.Forge.Statescript;
|
||||
using Gamesmiths.Forge.Tags;
|
||||
|
||||
using Godot;
|
||||
@@ -29,6 +30,7 @@ using Movementtests.tools;
|
||||
using Movementtests.forge.abilities;
|
||||
using Movementtests.tools.calculators;
|
||||
using RustyOptions;
|
||||
using Node = Godot.Node;
|
||||
|
||||
public record struct EmpoweredActionPayload;
|
||||
|
||||
@@ -103,6 +105,7 @@ public partial class PlayerController : CharacterBody3D,
|
||||
public EffectsManager EffectsManager { get; set; } = null!;
|
||||
public EntityAbilities Abilities { get; set; } = null!;
|
||||
public EventManager Events { get; set; } = null!;
|
||||
public Variables SharedVariables { get; }
|
||||
|
||||
// Inspector stuff
|
||||
[Export] public Marker3D TutorialWeaponTarget = null!;
|
||||
@@ -763,7 +766,6 @@ public partial class PlayerController : CharacterBody3D,
|
||||
effectComponents: [leftGrantComponent]);
|
||||
EffectsManager.ApplyEffect(new Effect(leftGrantEffect, new EffectOwnership(this, this)));
|
||||
}
|
||||
// GetTree().CreateTimer(5).Timeout += () => WeaponSystem.GrantNewAbilityForWeaponFly(weaponLandAbility);
|
||||
// Forge events
|
||||
var weaponLeftToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
|
||||
var weaponLandedToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
|
||||
|
||||
Reference in New Issue
Block a user