30 lines
998 B
C#
30 lines
998 B
C#
using System.Collections.Generic;
|
|
using Gamesmiths.Forge.Attributes;
|
|
using Gamesmiths.Forge.Core;
|
|
using Gamesmiths.Forge.Effects;
|
|
using Gamesmiths.Forge.Effects.Calculator;
|
|
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
using Gamesmiths.Forge.Effects.Modifiers;
|
|
using Gamesmiths.Forge.Events;
|
|
using Godot;
|
|
using Movementtests.systems;
|
|
|
|
namespace Movementtests.tools.calculators;
|
|
|
|
|
|
public class FlyingWeaponExecution(WeaponSystem weaponSystem) : CustomExecution
|
|
{
|
|
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
|
{
|
|
GD.Print("Custom execution executed");
|
|
weaponSystem.Events.Raise(new EventData<WeaponEventPayload>
|
|
{
|
|
EventTags = weaponSystem.WeaponFlyingTickEventTag.GetSingleTagContainer()!,
|
|
Source = weaponSystem,
|
|
EventMagnitude = 12f,
|
|
Payload = new WeaponEventPayload(Message: "flying")
|
|
});
|
|
|
|
return [];
|
|
}
|
|
} |