diff --git a/Assets/Scripts/Games/TheDazzles/TheDazzles.cs b/Assets/Scripts/Games/TheDazzles/TheDazzles.cs
index 8ed9dc58a..f9f9b1035 100644
--- a/Assets/Scripts/Games/TheDazzles/TheDazzles.cs
+++ b/Assets/Scripts/Games/TheDazzles/TheDazzles.cs
@@ -119,14 +119,20 @@ namespace HeavenStudio.Games.Loaders
new GameAction("boxColor", "Background Colors")
{
- function = delegate { var e = eventCaller.currentEntity; TheDazzles.instance.ChangeBoxColor(e["ext"], e["int"], e["wall"], e["roof"]); },
- defaultLength = 0.5f,
+ function = delegate { var e = eventCaller.currentEntity; TheDazzles.instance.ChangeBoxColor(e.beat, e.length, e["extStart"], e["extEnd"], e["intStart"], e["intEnd"], e["wallStart"], e["wallEnd"], e["roofStart"], e["roofEnd"], e["ease"]); },
+ defaultLength = 1f,
+ resizable = true,
parameters = new List()
{
- new Param("ext", TheDazzles.defaultExteriorColor, "Exterior", "Set the color of the boxes' exterior."),
- new Param("int", TheDazzles.defaultInteriorColor, "Interior", "Set the color of the boxes' interiors."),
- new Param("wall", TheDazzles.defaultWallColor, "Walls", "Set the color of the boxes' walls."),
- new Param("roof", TheDazzles.defaultRoofColor, "Roof", "Set the color of the boxes' roofs."),
+ new Param("extStart", TheDazzles.defaultExteriorColor, "Exterior Start", "Set the color of the boxes' exterior."),
+ new Param("extEnd", TheDazzles.defaultExteriorColor, "Exterior End", "Set the color of the boxes' exterior."),
+ new Param("intStart", TheDazzles.defaultInteriorColor, "Interior Start", "Set the color of the boxes' interiors."),
+ new Param("intEnd", TheDazzles.defaultInteriorColor, "Interior End", "Set the color of the boxes' interiors."),
+ new Param("wallStart", TheDazzles.defaultWallColor, "Walls Start", "Set the color of the boxes' walls."),
+ new Param("wallEnd", TheDazzles.defaultWallColor, "Walls End", "Set the color of the boxes' walls."),
+ new Param("roofStart", TheDazzles.defaultRoofColor, "Roof Start", "Set the color of the boxes' roofs."),
+ new Param("roofEnd", TheDazzles.defaultRoofColor, "Roof End", "Set the color of the boxes' roofs."),
+ new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
},
},
},
@@ -143,45 +149,6 @@ namespace HeavenStudio.Games
using Scripts_TheDazzles;
public class TheDazzles : Minigame
{
- private static Color _defaultExteriorColor;
- public static Color defaultExteriorColor
- {
- get
- {
- ColorUtility.TryParseHtmlString("#9CFEF6", out _defaultExteriorColor);
- return _defaultExteriorColor;
- }
- }
-
- private static Color _defaultInteriorColor;
- public static Color defaultInteriorColor
- {
- get
- {
- ColorUtility.TryParseHtmlString("#42FFEF", out _defaultInteriorColor);
- return _defaultInteriorColor;
- }
- }
-
- private static Color _defaultWallColor;
- public static Color defaultWallColor
- {
- get
- {
- ColorUtility.TryParseHtmlString("#00DEC5", out _defaultWallColor);
- return _defaultWallColor;
- }
- }
-
- private static Color _defaultRoofColor;
- public static Color defaultRoofColor
- {
- get
- {
- ColorUtility.TryParseHtmlString("#00BDAC", out _defaultRoofColor);
- return _defaultRoofColor;
- }
- }
public struct PosesToPerform : IComparable
{
@@ -274,6 +241,17 @@ namespace HeavenStudio.Games
Megamix = 1,
Random = 2,
}
+
+ public static Color defaultExteriorColor = new(156/255f, 254/255f, 246/255f);
+ public static Color defaultInteriorColor = new(66/255f, 255/255f, 239/255f);
+ public static Color defaultWallColor = new(0f, 222/255f, 197/255f);
+ public static Color defaultRoofColor = new(0f, 189/255f, 172/255f);
+
+ private ColorEase extColorEase = new(defaultExteriorColor);
+ private ColorEase intColorEase = new(defaultInteriorColor);
+ private ColorEase wallColorEase = new(defaultWallColor);
+ private ColorEase roofColorEase = new(defaultRoofColor);
+
public static TheDazzles instance;
[Header("Variables")]
@@ -337,6 +315,8 @@ namespace HeavenStudio.Games
void Update()
{
+ BoxColorUpdate();
+
if (conductor.isPlaying && !conductor.isPaused)
{
if (queuedPoses.Count > 0)
@@ -733,12 +713,20 @@ namespace HeavenStudio.Games
void Nothing(PlayerActionEvent caller) { }
- public void ChangeBoxColor(Color exterior, Color interior, Color walls, Color roof)
+ private void BoxColorUpdate()
{
- interiorMat.SetColor("_ColorAlpha", roof);
- interiorMat.SetColor("_ColorBravo", interior);
- interiorMat.SetColor("_ColorDelta", walls);
- exteriorMat.SetColor("_AddColor", exterior);
+ interiorMat.SetColor("_ColorAlpha", roofColorEase.GetColor());
+ interiorMat.SetColor("_ColorBravo", intColorEase.GetColor());
+ interiorMat.SetColor("_ColorDelta", wallColorEase.GetColor());
+ exteriorMat.SetColor("_AddColor", extColorEase.GetColor());
+ }
+
+ public void ChangeBoxColor(double beat, float length, Color exteriorStart, Color exteriorEnd, Color interiorStart, Color interiorEnd, Color wallsStart, Color wallsEnd, Color roofStart, Color roofEnd, int ease)
+ {
+ extColorEase = new ColorEase(beat, length, exteriorStart, exteriorEnd, ease);
+ intColorEase = new ColorEase(beat, length, interiorStart, interiorEnd, ease);
+ wallColorEase = new ColorEase(beat, length, wallsStart, wallsEnd, ease);
+ roofColorEase = new ColorEase(beat, length, roofStart, roofEnd, ease);
}
private void PersistColor(double beat)
@@ -748,7 +736,7 @@ namespace HeavenStudio.Games
{
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
var lastEvent = allEventsBeforeBeat[^1];
- ChangeBoxColor(lastEvent["ext"], lastEvent["int"], lastEvent["wall"], lastEvent["roof"]);
+ ChangeBoxColor(lastEvent.beat, lastEvent.length, lastEvent["extStart"], lastEvent["extEnd"], lastEvent["intStart"], lastEvent["intEnd"], lastEvent["wallStart"], lastEvent["wallEnd"], lastEvent["roofStart"], lastEvent["roofEnd"], lastEvent["ease"]);
}
}