Pattern burst rotation

This commit is contained in:
Marco 2025-09-24 16:51:47 +02:00
commit 099c8acf5e
10 changed files with 538 additions and 477 deletions

View file

@ -1,5 +1,6 @@
using System.Collections.Generic;
using Cirno.Scripts.Resources;
using Cirno.Scripts.Utils;
using Godot;
namespace Cirno.Scripts.Components;
@ -11,7 +12,7 @@ public class BulletInfo(BulletResource originalBulletResource)
public Vector2 Direction { get; set; }
public float Speed { get; set; }
public float LifeTime { get; set; }
public bool DestroyOnCollision { get; set; }
public bool DestroyOnCollision => Attributes.HasNoFlags(BulletFlags.Piercing);
public BulletOwner Owner { get; set; }
public DamageType DamageType { get; set; }
public float Damage { get; set; }
@ -21,15 +22,17 @@ public class BulletInfo(BulletResource originalBulletResource)
public float RotationOffset { get; set; }
//public double Time { get; set; }
public float Spread { get; set; }
public bool RotateSprite { get; set; } = false;
public bool Controllabe { get; set; } = false;
public bool Freezable { get; set; } = true;
public bool RotateSprite => Attributes.HasFlag(BulletFlags.Rotateable);
public bool Controllabe => Attributes.HasFlag(BulletFlags.Controllable);
public bool Freezable => Attributes.HasFlag(BulletFlags.Freezable);
public PackedScene BulletScene { get; set; }
public PackedScene DestructionParticlesScene { get; set; }
public IBulletModifier Modifier { get; set; }
public List<TimeModifier> TimeModifiers { get; set; } = new List<TimeModifier>();
public bool Grazeable { get; set; }
public bool Grazeable => Attributes.HasFlag(BulletFlags.Grazeable);
public float GrazeValue { get; set; }
public BulletFlags Attributes { get; set; }