Generic enemies

This commit is contained in:
Marco 2025-06-03 10:11:09 +02:00
commit d99c773641
55 changed files with 968 additions and 204 deletions

View file

@ -5,6 +5,7 @@ using Godot;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
public abstract partial class AttackPattern : Resource
{
//public Node2D Parent;

View file

@ -6,6 +6,7 @@ using Godot.Collections;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
public partial class BossPhase : Resource
{
[Export] public string PhaseName = string.Empty;

View file

@ -28,6 +28,8 @@ public partial class BulletResource : Resource
[Export] public bool Grazeable { get; set; } = true;
[Export] public float GrazeValue { get; set; } = 0.2f;
[Export] public BulletFlags Attributes { get; set; }
[Export]
public BulletCreationModifier Modifier;
[Export] public Array<TimeModifier> TimeModifiers;
@ -57,6 +59,7 @@ public partial class BulletResource : Resource
TimeModifiers = TimeModifiers.Select(x => x).ToList(),
Grazeable = Grazeable,
GrazeValue = GrazeValue,
Attributes = Attributes,
// TimeModifiers = TimeModifiers?.Where(mod => mod is TimeModifier).Cast<TimeModifier>().Select(m => new ModifierWrapper()
// {
// TimeModifier = m,

View file

@ -6,6 +6,7 @@ using Godot.Collections;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
public partial class BulletScript : Resource
{
[Export]

View file

@ -1,4 +1,5 @@
using Cirno.Scripts.Resources.Loot;
using Cirno.Scripts.Resources.ScriptableBullets;
using Godot;
using Godot.Collections;
@ -33,5 +34,8 @@ public partial class EnemyResource : Resource
[Export] public float ResponseTime { get; private set; } = 0.5f;
[Export] public Texture2D IconSprite { get; private set; }
[Export] public SpriteFrames AnimationFrames { get; private set; }
[Export] public BossScript BossScript { get; private set; }
}

View file

@ -5,6 +5,7 @@ using Godot;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
public partial class FSMMovementPattern : AttackPattern
{
[Export] private Vector2 relativeTargetPosition;

View file

@ -7,6 +7,7 @@ using Godot.Collections;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
public partial class PatternGroup : AttackPattern
{
[Export] private Array<AttackPattern> patterns;

View file

@ -4,6 +4,7 @@ using Godot.Collections;
namespace Cirno.Scripts.Resources.ScriptableBullets;
[GlobalClass]
[Tool]
public partial class BossScript : Resource
{
[Export]

View file

@ -6,6 +6,7 @@ using Godot.Collections;
namespace Cirno.Scripts.Resources.ScriptableBullets;
[GlobalClass]
[Tool]
public partial class ParallelPatternGroup : AttackPattern
{
[Export(PropertyHint.None, "suffix:s")] public float Duration { get; private set; } = 10f;

View file

@ -5,6 +5,7 @@ using Godot;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
public partial class SimpleMovementPattern : AttackPattern
{
[Export] private Vector2 relativeTargetPosition;