mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Danmaku system
This commit is contained in:
parent
9c8ec486fc
commit
fdec052c16
38 changed files with 924 additions and 9 deletions
14
Scripts/Resources/DecreasingSpeedModifier.cs
Normal file
14
Scripts/Resources/DecreasingSpeedModifier.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class DecreasingSpeedModifier : Resource, IBulletModifier
|
||||
{
|
||||
[Export] private float decreaseRate = 0.1f;
|
||||
|
||||
public float ModifySpeed(float baseSpeed, int bulletIndex)
|
||||
{
|
||||
return Mathf.Max(0, baseSpeed - (decreaseRate * bulletIndex));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue