mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 03:45:54 +00:00
Lasers
This commit is contained in:
parent
95979bd3b8
commit
ba2f6a97fc
9 changed files with 254 additions and 26 deletions
28
Scripts/AttackPatterns/LaserPattern.cs
Normal file
28
Scripts/AttackPatterns/LaserPattern.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using Cirno.Scripts.Components;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.AttackPatterns;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class LaserPattern : SpiralPattern
|
||||
{
|
||||
[ExportGroup("Laser")][Export] public float SpawnDelay { get; set; } = 0.3f; // Delay before beam appears
|
||||
[ExportGroup("Laser")][Export] public float PreFireTime { get; set; } = 0.5f; // Time before laser becomes lethal
|
||||
[ExportGroup("Laser")][Export] public float LethalTime { get; set; } = 1.5f; // Time laser remains lethal
|
||||
[ExportGroup("Laser")][Export] public Color PreFireColor { get; set; } = new Color(1, 0, 0, 0.5f); // Thin red beam
|
||||
[ExportGroup("Laser")][Export] public Color LethalColor { get; set; } = new Color(1, 0, 0, 1.0f); // Thicker beam
|
||||
|
||||
protected override BulletInfo MakeBullet(Vector2 position, Vector2 direction, float angleOffset)
|
||||
{
|
||||
var bf = base.MakeBullet(position, direction, angleOffset);
|
||||
|
||||
bf.IsLaser = true;
|
||||
bf.PreFireTime = PreFireTime;
|
||||
bf.LethalTime = LethalTime;
|
||||
bf.PreFireColor = PreFireColor;
|
||||
bf.LethalColor = LethalColor;
|
||||
bf.SpawnDelay = SpawnDelay;
|
||||
|
||||
return bf;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue