Implement Bubble controller, sprite and VR01 body behavior

This commit is contained in:
UnixNight committed 2026-11-02 16:57:54 -05:00
1 parent 9ea578492d
commit 1ae5f4251c
51 files changed
+2811 -54

No files matched your search

+9
View File
@@ -17,6 +17,8 @@ public sealed class InvisibleGadget
public int Activations { get; private set; }
public bool Active => Equipped && !Targetable;
public event Action<bool>? EquippedChanged;
public event Action<float>? AlphaRequested;
public event Action<bool>? BlendRequested;
public bool Equip(float energy, bool energyOverride)
{
@@ -30,6 +32,8 @@ public sealed class InvisibleGadget
public void Release()
{
BlendRequested?.Invoke(true);
AlphaRequested?.Invoke(0);
Equipped = false; Remaining = Duration; Recharge = 0;
Targetable = true; Opacity = 1; ConventionalBlend = false;
MeterVisible = false; MeterReady = false;
@@ -62,6 +66,7 @@ public sealed class InvisibleGadget
adjustEnergy(-2);
Remaining = Duration; Recharge = 0; Activations++;
ConventionalBlend = false; Opacity = .7f; Targetable = false;
BlendRequested?.Invoke(false); AlphaRequested?.Invoke(.7f);
}
}
if (Remaining == 0 && (energy > 0 || energyOverride))
@@ -79,9 +84,13 @@ public sealed class InvisibleGadget
{
Remaining = 0; Opacity = 1; Targetable = true;
ConventionalBlend = false; MeterReady = false;
BlendRequested?.Invoke(true); AlphaRequested?.Invoke(0);
return;
}
if (Remaining <= 3)
{
ConventionalBlend = ((int)((double)Remaining * 5) & 1) != 0;
BlendRequested?.Invoke(ConventionalBlend);
}
}
}