mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 06:37:37 +02:00
Misc Release 1 Customization (#945)
* Add files via upload
* Recolorable Dazzles
idk how github works lol
* Fork Lifter - new gradients + extra customization
Currently doesn't have proper support for old charts, those will be made to default to the Classic gradient at some point in the future
* Fork Lifter - Megamix Floor + Backwards Compat
also includes better gradients
* oops
new gradients start as version = 1 now lol. my bad
* oops part 2
fork lifter lines can be toggled off properly now lol
* Recolorable Fireworks
note to self - make sure everything new is actually in the bundles before PRing all this because im realizing i forgot to do that for the bg gradient here
* Recolorable Space Soccer Kicker/Platform (+ assbunning things)
just dazzles easing + a doublecheck of everything left and i'm pr-ing
* Dazzles BG Color Easing
pr soon™️
* Proper Space Soccer sheet + minor text rewrites
can prolly pr now. lemme figure that out
* removing unused stuff + fixing space soccer
i downloaded github desktop and wow this is so much easier lol
also apparently i did an oopsie with space soccer so. fixed that
* removing my settings stuff
oopsy
* small fork lifter fix
for some reason the flicking guy's shadow peeked out of the viewcircle so here's an incredibly lazy fix for that. should work fine enough
* i thought i got rid of these earlier
oopsie
* Update TheDazzles.cs
i love minor text errors!!!!!
* Update SpaceSoccer.cs
forgot to update a thing while changing the star colors, oops
This commit is contained in:
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using NaughtyBezierCurves;
|
||||
using DG.Tweening;
|
||||
using Jukebox;
|
||||
|
||||
namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
@ -11,6 +12,30 @@ namespace HeavenStudio.Games.Loaders
|
||||
public static class AgbFireworkLoader
|
||||
{
|
||||
public static Minigame AddGame(EventCaller eventCaller) {
|
||||
|
||||
RiqEntity fwBGUpdater(string datamodel, RiqEntity e)
|
||||
{
|
||||
if (datamodel == "fireworks/altBG")
|
||||
{
|
||||
e.CreateProperty("stars", (!e["toggle"]));
|
||||
e.CreateProperty("faces", (e["toggle"]));
|
||||
e.CreateProperty("startTop", new Color(0f, 8/255f, 32/255f));
|
||||
e.CreateProperty("endTop", new Color(0f, 8/255f, 32/255f));
|
||||
e.CreateProperty("startBot", new Color(0f, 51/255f, 119/255f));
|
||||
e.CreateProperty("endBot", new Color(0f, 51/255f, 119/255f));
|
||||
e.CreateProperty("startCity", new Color(0f, 8/255f, 32/255f));
|
||||
e.CreateProperty("endCity", new Color(0f, 8/255f, 32/255f));
|
||||
e.CreateProperty("ease", 0);
|
||||
|
||||
e.dynamicData.Remove("toggle");
|
||||
|
||||
e.datamodel = "fireworks/changeBG";
|
||||
return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
RiqBeatmap.OnUpdateEntity += fwBGUpdater;
|
||||
|
||||
return new Minigame("fireworks", "Fireworks \n<color=#adadad>(Hanabi)</color>", "000820", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("firework", "Firework")
|
||||
@ -58,13 +83,35 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("count", Fireworks.CountInType.CountOne, "Type", "Set the number to be said.")
|
||||
}
|
||||
},
|
||||
new GameAction("altBG", "Background Appearance")
|
||||
new GameAction("changeBG", "Background Appearance")
|
||||
{
|
||||
function = delegate {
|
||||
var e = eventCaller.currentEntity;
|
||||
Fireworks.instance.BackgroundColor(e.beat, e.length, e["stars"], e["faces"], e["startTop"], e["endTop"], e["startBot"], e["endBot"], e["startCity"], e["endCity"], e["ease"]);
|
||||
},
|
||||
resizable = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("stars", true, "Stars", "Toggle if the stars should appear."),
|
||||
new Param("faces", false, "Remix 5", "Toggle if the faces from Remix 5 (GBA) should appear."),
|
||||
new Param("startTop", new Color(0f, 8/255f, 32/255f), "Gradient Top Start", "Set the color at the start of the event."),
|
||||
new Param("endTop", new Color(0f, 8/255f, 32/255f), "Gradient Top End", "Set the color at the end of the event."),
|
||||
new Param("startBot", new Color(0f, 51/255f, 119/255f), "Gradient Bottom Start", "Set the color at the start of the event."),
|
||||
new Param("endBot", new Color(0f, 51/255f, 119/255f), "Gradient Bottom End", "Set the color at the end of the event."),
|
||||
new Param("startCity", new Color(0f, 8/255f, 32/255f), "City Start", "Set the color at the start of the event."),
|
||||
new Param("endCity", new Color(0f, 8/255f, 32/255f), "City End", "Set the color at the end of the event."),
|
||||
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
|
||||
}
|
||||
},
|
||||
|
||||
new GameAction("altBG", "Background Appearance (OLD)")
|
||||
{
|
||||
function = delegate {var e = eventCaller.currentEntity; Fireworks.instance.ChangeBackgroundAppearance(e["toggle"]); },
|
||||
defaultLength = 0.5f,
|
||||
hidden = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("toggle", true, "Remix 5", "Togle if the background from Remix 5 (GBA) should appear.")
|
||||
new Param("toggle", true, "Remix 5", "Toggle fi ze bckgrond frum realix 5 (GFA) shool aper. (You should never see this.)")
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -122,11 +169,18 @@ namespace HeavenStudio.Games
|
||||
[SerializeField] FireworksBomb bomb;
|
||||
[SerializeField] BezierCurve3D bombCurve;
|
||||
[SerializeField] SpriteRenderer flashWhite;
|
||||
[SerializeField] SpriteRenderer gradientTop;
|
||||
[SerializeField] SpriteRenderer gradientBottom;
|
||||
[SerializeField] SpriteRenderer city;
|
||||
[SerializeField] GameObject faces;
|
||||
[SerializeField] GameObject stars;
|
||||
[Header("Properties")]
|
||||
Tween flashTween;
|
||||
public static List<QueuedFirework> queuedFireworks = new List<QueuedFirework>();
|
||||
|
||||
private ColorEase topColorEase = new(new Color(0f, 8/255f, 32/255f));
|
||||
private ColorEase botColorEase = new(new Color(0f, 51/255f, 119/255f));
|
||||
private ColorEase cityColorEase = new(new Color(0f, 8/255f, 32/255f));
|
||||
|
||||
public static Fireworks instance;
|
||||
|
||||
@ -143,6 +197,11 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public override void OnPlay(double beat)
|
||||
{
|
||||
PersistColor(beat);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
@ -159,12 +218,14 @@ namespace HeavenStudio.Games
|
||||
queuedFireworks.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
BackgroundColorUpdate();
|
||||
}
|
||||
|
||||
public void ChangeBackgroundAppearance(bool doIt)
|
||||
{
|
||||
faces.SetActive(doIt);
|
||||
stars.SetActive(!doIt);
|
||||
//faces.SetActive(doIt);
|
||||
//stars.SetActive(!doIt);
|
||||
}
|
||||
|
||||
public static void CountIn(double beat, int count)
|
||||
@ -314,6 +375,39 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
ChangeFlashColor(start, 0f);
|
||||
ChangeFlashColor(end, beats);
|
||||
}
|
||||
|
||||
private void BackgroundColorUpdate()
|
||||
{
|
||||
gradientTop.color = topColorEase.GetColor();
|
||||
gradientBottom.color = botColorEase.GetColor();
|
||||
city.color = cityColorEase.GetColor();
|
||||
}
|
||||
|
||||
public void BackgroundColor(double beat, float length, bool dostars, bool dormx5, Color topStart, Color topEnd, Color botStart, Color botEnd, Color cityStart, Color cityEnd, int ease)
|
||||
{
|
||||
topColorEase = new ColorEase(beat, length, topStart, topEnd, ease);
|
||||
botColorEase = new ColorEase(beat, length, botStart, botEnd, ease);
|
||||
cityColorEase = new ColorEase(beat, length, cityStart, cityEnd, ease);
|
||||
|
||||
faces.SetActive(dormx5);
|
||||
stars.SetActive(dostars);
|
||||
}
|
||||
|
||||
private void PersistColor(double beat)
|
||||
{
|
||||
var allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("fireworks", new string[] { "changeBG" }).FindAll(x => x.beat < beat);
|
||||
if (allEventsBeforeBeat.Count > 0)
|
||||
{
|
||||
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEvent = allEventsBeforeBeat[^1];
|
||||
BackgroundColor(lastEvent.beat, lastEvent.length, lastEvent["stars"], lastEvent["faces"], lastEvent["startTop"], lastEvent["endTop"], lastEvent["startBot"], lastEvent["endBot"], lastEvent["startCity"], lastEvent["endCity"], lastEvent["ease"]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGameSwitch(double beat)
|
||||
{
|
||||
PersistColor(beat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using Jukebox;
|
||||
using HeavenStudio.Games.Scripts_ForkLifter;
|
||||
|
||||
namespace HeavenStudio.Games.Loaders
|
||||
@ -10,7 +11,21 @@ namespace HeavenStudio.Games.Loaders
|
||||
using static Minigames;
|
||||
public static class RvlForkLoader
|
||||
{
|
||||
public static Minigame AddGame(EventCaller eventCaller) {
|
||||
public static Minigame AddGame(EventCaller eventCaller)
|
||||
{
|
||||
RiqEntity flGradientUpdater(string datamodel, RiqEntity e)
|
||||
{
|
||||
if (datamodel == "forkLifter/colorGrad" && e.version == 0)
|
||||
{
|
||||
e.CreateProperty("type", 2);
|
||||
e["type"] = 2; // setting it in create property doesn't work for some reason? lol
|
||||
e.version = 1;
|
||||
return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
RiqBeatmap.OnUpdateEntity += flGradientUpdater;
|
||||
|
||||
return new Minigame("forkLifter", "Fork Lifter", "f1f1f1", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("flick", "Flick Food")
|
||||
@ -64,12 +79,35 @@ namespace HeavenStudio.Games.Loaders
|
||||
},
|
||||
new GameAction("colorGrad", "Gradient Appearance")
|
||||
{
|
||||
function = delegate { var e = eventCaller.currentEntity; ForkLifter.instance.BackgroundColorGrad(e.beat, e.length, e["start"], e["end"], e["ease"]); },
|
||||
function = delegate { var e = eventCaller.currentEntity; ForkLifter.instance.BackgroundColorGrad(e.beat, e.length, (e.version = 1),
|
||||
e["type"], e["toggleVC"], e["toggleLines"],
|
||||
e["start"], e["end"],
|
||||
e["startBG"], e["endBG"],
|
||||
e["startLines"], e["endLines"],
|
||||
e["ease"]); },
|
||||
resizable = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("start", Color.white, "Start Color", "Set the color at the start of the event."),
|
||||
new Param("end", Color.white, "End Color", "Set the color at the end of the event."),
|
||||
new Param("type", ForkLifter.GradientType.Game, "Gradient Type", "Set the type of gradient.", new List<Param.CollapseParam>()
|
||||
{
|
||||
new Param.CollapseParam((x, _) => (int)x != (int)ForkLifter.GradientType.Classic, new string[] { "startBG", "endBG", "toggleLines" })
|
||||
}),
|
||||
|
||||
new Param("toggleVC", false, "Viewcircle Uses Gradient Color", "If toggled, the viewcircle's background will use the gradient top color. Otherwise, it will use the background color."),
|
||||
new Param("toggleLines", false, "Megamix Lines", "If toggled, the lines from Megamix will be enabled.", new List<Param.CollapseParam>()
|
||||
{
|
||||
new Param.CollapseParam((x, _) => (bool)x, new string[] { "startLines", "endLines" }),
|
||||
}),
|
||||
|
||||
new Param("start", new Color(224/255f, 224/255f, 224/255f), "Gradient Top Start", "Set the color at the start of the event."),
|
||||
new Param("end", new Color(224/255f, 224/255f, 224/255f), "Gradient Top End", "Set the color at the end of the event."),
|
||||
|
||||
new Param("startBG", Color.white, "Gradient Bottom Start", "Set the color at the start of the event."),
|
||||
new Param("endBG", Color.white, "Gradient Bottom End", "Set the color at the end of the event."),
|
||||
|
||||
new Param("startLines", new Color(243/255f, 243/255f, 243/255f), "Lines Start", "Set the color at the start of the event."),
|
||||
new Param("endLines", new Color(243/255f, 243/255f, 243/255f), "Lines End", "Set the color at the end of the event."),
|
||||
|
||||
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
|
||||
},
|
||||
},
|
||||
@ -85,11 +123,12 @@ namespace HeavenStudio.Games.Loaders
|
||||
|
||||
namespace HeavenStudio.Games
|
||||
{
|
||||
using Jukebox;
|
||||
// using Jukebox;
|
||||
using Scripts_ForkLifter;
|
||||
|
||||
public class ForkLifter : Minigame
|
||||
{
|
||||
|
||||
public enum FlickType
|
||||
{
|
||||
Pea,
|
||||
@ -97,6 +136,13 @@ namespace HeavenStudio.Games
|
||||
Burger,
|
||||
BottomBun
|
||||
}
|
||||
|
||||
public enum GradientType
|
||||
{
|
||||
Game,
|
||||
Remix,
|
||||
Classic
|
||||
}
|
||||
|
||||
public static ForkLifter instance;
|
||||
public static ForkLifterPlayer playerInstance => ForkLifterPlayer.instance;
|
||||
@ -109,10 +155,17 @@ namespace HeavenStudio.Games
|
||||
public GameObject flickedObject;
|
||||
public SpriteRenderer peaPreview;
|
||||
[SerializeField] SpriteRenderer bg;
|
||||
[SerializeField] SpriteRenderer bgGradient;
|
||||
|
||||
//public Material gradientMaterial;
|
||||
public SpriteRenderer[] Gradients;
|
||||
[SerializeField] SpriteRenderer gradientFiller;
|
||||
[SerializeField] SpriteRenderer mmLines;
|
||||
|
||||
[SerializeField] SpriteRenderer viewerCircle;
|
||||
[SerializeField] SpriteRenderer viewerCircleBg;
|
||||
[SerializeField] SpriteRenderer playerShadow;
|
||||
[SerializeField] SpriteRenderer handShadow;
|
||||
public SpriteRenderer[] forkEffects;
|
||||
|
||||
public Sprite[] peaSprites;
|
||||
public Sprite[] peaHitSprites;
|
||||
@ -145,7 +198,7 @@ namespace HeavenStudio.Games
|
||||
|
||||
var lastColorGrad = actionsBefore.FindLast(e => e.datamodel == "forkLifter/colorGrad");
|
||||
if (lastColorGrad != null) {
|
||||
BackgroundColorGrad(lastColorGrad.beat, lastColorGrad.length, lastColorGrad["start"], lastColorGrad["end"], lastColorGrad["ease"]);
|
||||
BackgroundColorGrad(lastColorGrad.beat, lastColorGrad.length, lastColorGrad.version, lastColorGrad["type"], lastColorGrad["toggleVC"], lastColorGrad["toggleLines"], lastColorGrad["start"], lastColorGrad["end"], lastColorGrad["startBG"], lastColorGrad["endBG"], lastColorGrad["startLines"], lastColorGrad["endLines"], lastColorGrad["ease"]);
|
||||
}
|
||||
|
||||
var tempFlicks = actions.FindAll(e => e.datamodel == "forkLifter/flick");
|
||||
@ -180,17 +233,58 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
|
||||
private ColorEase bgColorEase = new(Color.white);
|
||||
private ColorEase gradColorEase = new(Color.white);
|
||||
private ColorEase gradColorEase = new(new Color(224/255f, 224/255f, 224/255f));
|
||||
private ColorEase linesColorEase = new(new Color (243/255f, 243/255f, 243/255f));
|
||||
private ColorEase gradBgEase = new(Color.white);
|
||||
private bool vCircleToggle = false;
|
||||
|
||||
//call this in update
|
||||
private void BackgroundColorUpdate()
|
||||
{
|
||||
bg.color =
|
||||
viewerCircle.color =
|
||||
handShadow.color = bgColorEase.GetColor();
|
||||
|
||||
bgGradient.color =
|
||||
playerShadow.color = gradColorEase.GetColor();
|
||||
bg.color =
|
||||
viewerCircle.color = bgColorEase.GetColor();
|
||||
|
||||
mmLines.color = linesColorEase.GetColor();
|
||||
|
||||
for (int i = 0; i < Gradients.Length; i++)
|
||||
{
|
||||
Gradients[i].color = gradColorEase.GetColor();
|
||||
}
|
||||
|
||||
|
||||
if (Gradients[2].gameObject.activeSelf)
|
||||
{
|
||||
gradientFiller.color =
|
||||
playerShadow.color = gradColorEase.GetColor();
|
||||
|
||||
for (int i = 0; i < forkEffects.Length; i++)
|
||||
{
|
||||
forkEffects[i].color = gradColorEase.GetColor();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gradientFiller.color =
|
||||
playerShadow.color = gradBgEase.GetColor();
|
||||
|
||||
for (int i = 0; i < forkEffects.Length; i++)
|
||||
{
|
||||
forkEffects[i].color = gradBgEase.GetColor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (vCircleToggle)
|
||||
{
|
||||
viewerCircleBg.color =
|
||||
handShadow.color = gradColorEase.GetColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
viewerCircleBg.color =
|
||||
handShadow.color = bgColorEase.GetColor();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void BackgroundColor(double beat, float length, Color startColor, Color endColor, int ease)
|
||||
@ -198,9 +292,28 @@ namespace HeavenStudio.Games
|
||||
bgColorEase = new ColorEase(beat, length, startColor, endColor, ease);
|
||||
}
|
||||
|
||||
public void BackgroundColorGrad(double beat, float length, Color startColor, Color endColor, int ease)
|
||||
public void BackgroundColorGrad(double beat, float length, int version, int gradType, bool vCircle, bool lines, Color startColor, Color endColor, Color startBottom, Color endBottom, Color startLines, Color endLines, int ease)
|
||||
{
|
||||
gradColorEase = new ColorEase(beat, length, startColor, endColor, ease);
|
||||
gradBgEase = new ColorEase(beat, length, startBottom, endBottom, ease);
|
||||
linesColorEase = new ColorEase(beat, length, startLines, endLines, ease);
|
||||
|
||||
for (int i = 0; i < Gradients.Length; i++)
|
||||
{
|
||||
Gradients[i].gameObject.SetActive(gradType == (i));
|
||||
}
|
||||
|
||||
if (gradType != 2)
|
||||
{
|
||||
mmLines.gameObject.SetActive(lines);
|
||||
}
|
||||
else
|
||||
{
|
||||
mmLines.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
vCircleToggle = (vCircle);
|
||||
}
|
||||
|
||||
//call this in OnPlay(double beat) and OnGameSwitch(double beat)
|
||||
@ -219,7 +332,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
allEventsBeforeBeatGrad.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEventGrad = allEventsBeforeBeatGrad[^1];
|
||||
BackgroundColorGrad(lastEventGrad.beat, lastEventGrad.length, lastEventGrad["start"], lastEventGrad["end"], lastEventGrad["ease"]);
|
||||
BackgroundColorGrad(lastEventGrad.beat, lastEventGrad.length, lastEventGrad.version, lastEventGrad["type"], lastEventGrad["toggleVC"], lastEventGrad["toggleLines"], lastEventGrad["start"], lastEventGrad["end"], lastEventGrad["startBG"], lastEventGrad["endBG"], lastEventGrad["startLines"], lastEventGrad["endLines"], lastEventGrad["ease"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,11 +96,37 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
new Param("start", SpaceSoccer.defaultBGColor, "Start Color", "Set the color at the start of the event."),
|
||||
new Param("end", SpaceSoccer.defaultBGColor, "End Color", "Set the color at the end of the event."),
|
||||
new Param("startDots", Color.white, "Start Color (Dots)", "Set the color at the start of the event."),
|
||||
new Param("endDots", Color.white, "End Color (Dots)", "Set the color at the end of the event."),
|
||||
new Param("startDots", SpaceSoccer.defaultStarColor, "Start Color (Dots)", "Set the color at the start of the event."),
|
||||
new Param("endDots", SpaceSoccer.defaultStarColor, "End Color (Dots)", "Set the color at the end of the event."),
|
||||
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
|
||||
}
|
||||
},
|
||||
new GameAction("changeKick", "Kicker Appearance")
|
||||
{
|
||||
function = delegate {var e = eventCaller.currentEntity; SpaceSoccer.instance.KickerColor(e.beat, e["outfit"], e["boots"], e["skin"]); },
|
||||
defaultLength = 0.5f,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("outfit", SpaceSoccer.kickerLavender, "Outfit Color", "Set the color of the kicker's outfit."),
|
||||
new Param("boots", SpaceSoccer.kickerPurple, "Boots Color", "Set the color of the kicker's boots. This color is also used for the kicker's joints and eyebrows."),
|
||||
new Param("skin", Color.white, "Skin Color", "Set the color of the kicker's skin."),
|
||||
}
|
||||
},
|
||||
new GameAction("changePlat", "Platform Appearance")
|
||||
{
|
||||
function = delegate {var e = eventCaller.currentEntity; SpaceSoccer.instance.PlatformColor(e.beat, e["top"], e["side"], e["outline"], e["flame"], e["mid"]); },
|
||||
defaultLength = 0.5f,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("top", SpaceSoccer.platTop, "Top Color", "Set the color of the platform's top."),
|
||||
new Param("side", SpaceSoccer.platSide, "Side Color", "Set the color of the platform's side."),
|
||||
new Param("outline", SpaceSoccer.platOutline, "Outline Color", "Set the color of the platform's outline."),
|
||||
new Param("flame", SpaceSoccer.kickerLavender, "Flame Color", "Set the color of the flame."),
|
||||
new Param("mid", SpaceSoccer.fireYellow, "Flame Middle Color", "Set the color of the middle of the flame."),
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
new GameAction("scroll", "Scrolling Background")
|
||||
{
|
||||
function = delegate { var e = eventCaller.currentEntity; SpaceSoccer.instance.UpdateScrollSpeed(e["x"], e["y"]); },
|
||||
@ -167,7 +193,7 @@ namespace HeavenStudio.Games
|
||||
using System;
|
||||
|
||||
public class SpaceSoccer : Minigame
|
||||
{
|
||||
{
|
||||
public enum EnterExitPresets
|
||||
{
|
||||
FiveKickers,
|
||||
@ -192,6 +218,13 @@ namespace HeavenStudio.Games
|
||||
Exit = 1
|
||||
}
|
||||
public static Color defaultBGColor = new(1f, 0.49f, 0.153f);
|
||||
public static Color defaultStarColor = new(248/255f, 248/255f, 248/255f);
|
||||
public static Color kickerLavender = new(184/255f, 136/255f, 248/255f);
|
||||
public static Color kickerPurple = new(136/255f, 64/255f, 248/255f);
|
||||
public static Color platTop = new(112/255f, 248/255f, 144/255f);
|
||||
public static Color platSide = new(88/255f, 168/255f, 128/255f);
|
||||
public static Color platOutline = new(24/255f, 56/255f, 40/255f);
|
||||
public static Color fireYellow = new(248/255f, 248/255f, 88/255f);
|
||||
|
||||
[Header("Components")]
|
||||
[SerializeField] private GameObject kickerPrefab;
|
||||
@ -209,6 +242,12 @@ namespace HeavenStudio.Games
|
||||
float yScrollMultiplier = 0.3f;
|
||||
[SerializeField] private float xBaseSpeed = 1;
|
||||
[SerializeField] private float yBaseSpeed = 1;
|
||||
|
||||
[Header("Materials")]
|
||||
public Material kickerMat;
|
||||
public Material mouthMat;
|
||||
public Material platMat;
|
||||
public Material fireMat;
|
||||
|
||||
private List<double> _highKickToeBeats = new();
|
||||
private List<double> _stopBeats = new();
|
||||
@ -238,6 +277,16 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
_highKickToeBeats.Add(e.beat);
|
||||
}
|
||||
|
||||
kickerMat.SetColor("_ColorAlpha", kickerLavender);
|
||||
kickerMat.SetColor("_ColorBravo", Color.white);
|
||||
mouthMat.SetColor("_ColorBravo", Color.white);
|
||||
kickerMat.SetColor("_ColorDelta", kickerPurple);
|
||||
platMat.SetColor("_ColorAlpha", platOutline);
|
||||
platMat.SetColor("_ColorBravo", platTop);
|
||||
platMat.SetColor("_ColorDelta", platSide);
|
||||
fireMat.SetColor("_ColorAlpha", kickerLavender);
|
||||
fireMat.SetColor("_ColorDelta", fireYellow);
|
||||
}
|
||||
|
||||
new void OnDrawGizmos()
|
||||
@ -560,7 +609,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
|
||||
private ColorEase bgColorEase = new(defaultBGColor);
|
||||
private ColorEase dotColorEase = new(Color.white);
|
||||
private ColorEase dotColorEase = new(defaultStarColor);
|
||||
|
||||
//call this in update
|
||||
private void BackgroundColorUpdate()
|
||||
@ -572,6 +621,23 @@ namespace HeavenStudio.Games
|
||||
bgColorEase = new(beat, length, startColorBG, endColorBG, ease);
|
||||
dotColorEase = new(beat, length, startColorDot, endColorDot, ease);
|
||||
}
|
||||
|
||||
public void KickerColor(double beat, Color main, Color alt, Color skin)
|
||||
{
|
||||
kickerMat.SetColor("_ColorAlpha", main);
|
||||
kickerMat.SetColor("_ColorBravo", skin);
|
||||
mouthMat.SetColor("_ColorBravo", skin);
|
||||
kickerMat.SetColor("_ColorDelta", alt);
|
||||
}
|
||||
|
||||
public void PlatformColor(double beat, Color top, Color side, Color outline, Color fire, Color mid)
|
||||
{
|
||||
platMat.SetColor("_ColorAlpha", outline);
|
||||
platMat.SetColor("_ColorBravo", top);
|
||||
platMat.SetColor("_ColorDelta", side);
|
||||
fireMat.SetColor("_ColorAlpha", fire);
|
||||
fireMat.SetColor("_ColorDelta", mid);
|
||||
}
|
||||
|
||||
//call this in OnPlay(double beat) and OnGameSwitch(double beat)
|
||||
private void PersistColor(double beat)
|
||||
@ -582,6 +648,22 @@ namespace HeavenStudio.Games
|
||||
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEvent = allEventsBeforeBeat[^1];
|
||||
BackgroundColor(lastEvent.beat, lastEvent.length, lastEvent["start"], lastEvent["end"], lastEvent["startDots"], lastEvent["endDots"], lastEvent["ease"]);
|
||||
}
|
||||
|
||||
var allEventsBeforeBeatKick = EventCaller.GetAllInGameManagerList("spaceSoccer", new string[] { "changeKick" }).FindAll(x => x.beat < beat);
|
||||
if (allEventsBeforeBeatKick.Count > 0)
|
||||
{
|
||||
allEventsBeforeBeatKick.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEvent = allEventsBeforeBeatKick[^1];
|
||||
KickerColor(lastEvent.beat, lastEvent["outfit"], lastEvent["boots"], lastEvent["skin"]);
|
||||
}
|
||||
|
||||
var allEventsBeforeBeatPlat = EventCaller.GetAllInGameManagerList("spaceSoccer", new string[] { "changePlat" }).FindAll(x => x.beat < beat);
|
||||
if (allEventsBeforeBeatPlat.Count > 0)
|
||||
{
|
||||
allEventsBeforeBeatPlat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEvent = allEventsBeforeBeatPlat[^1];
|
||||
PlatformColor(lastEvent.beat, lastEvent["top"], lastEvent["side"], lastEvent["outline"], lastEvent["flame"], lastEvent["mid"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,25 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
function = delegate { TheDazzles.instance.ForceHold(); },
|
||||
defaultLength = 0.5f
|
||||
},
|
||||
|
||||
new GameAction("boxColor", "Background Colors")
|
||||
{
|
||||
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<Param>()
|
||||
{
|
||||
new Param("extStart", TheDazzles.defaultExteriorColor, "Exterior Start", "Set the color of the boxes' exterior at the start of the event."),
|
||||
new Param("extEnd", TheDazzles.defaultExteriorColor, "Exterior End", "Set the color of the boxes' exterior at the end of the event."),
|
||||
new Param("intStart", TheDazzles.defaultInteriorColor, "Interior Start", "Set the color of the boxes' interiors at the start of the event."),
|
||||
new Param("intEnd", TheDazzles.defaultInteriorColor, "Interior End", "Set the color of the boxes' interiors at the end of the event."),
|
||||
new Param("wallStart", TheDazzles.defaultWallColor, "Walls Start", "Set the color of the boxes' walls at the start of the event."),
|
||||
new Param("wallEnd", TheDazzles.defaultWallColor, "Walls End", "Set the color of the boxes' walls at the end of the event."),
|
||||
new Param("roofStart", TheDazzles.defaultRoofColor, "Roof Start", "Set the color of the boxes' roofs at the start of the event."),
|
||||
new Param("roofEnd", TheDazzles.defaultRoofColor, "Roof End", "Set the color of the boxes' roofs at the end of the event."),
|
||||
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
|
||||
},
|
||||
},
|
||||
},
|
||||
new List<string>() {"ntr", "normal"},
|
||||
@ -130,6 +149,7 @@ namespace HeavenStudio.Games
|
||||
using Scripts_TheDazzles;
|
||||
public class TheDazzles : Minigame
|
||||
{
|
||||
|
||||
public struct PosesToPerform : IComparable<PosesToPerform>
|
||||
{
|
||||
// override object.Equals
|
||||
@ -221,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")]
|
||||
@ -235,6 +266,9 @@ namespace HeavenStudio.Games
|
||||
[SerializeField] TheDazzlesGirl player;
|
||||
[SerializeField] ParticleSystem poseEffect;
|
||||
[SerializeField] ParticleSystem starsEffect;
|
||||
[Header("RecolorMaterials")]
|
||||
public Material interiorMat;
|
||||
public Material exteriorMat;
|
||||
|
||||
public static PlayerInput.InputAction InputAction_TouchRelease =
|
||||
new("NtrBoxshowTouchRelease", new int[] { IAEmptyCat, IAReleaseCat, IAEmptyCat },
|
||||
@ -254,6 +288,10 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
instance = this;
|
||||
SetupBopRegion("theDazzles", "bop", "toggle");
|
||||
interiorMat.SetColor("_ColorAlpha", defaultRoofColor);
|
||||
interiorMat.SetColor("_ColorBravo", defaultInteriorColor);
|
||||
interiorMat.SetColor("_ColorDelta", defaultWallColor);
|
||||
exteriorMat.SetColor("_AddColor", defaultExteriorColor);
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
@ -272,10 +310,13 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
||||
if (queuedCrouches.Count > 0) queuedCrouches.Clear();
|
||||
PersistColor(beat);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
BoxColorUpdate();
|
||||
|
||||
if (conductor.isPlaying && !conductor.isPaused)
|
||||
{
|
||||
if (queuedPoses.Count > 0)
|
||||
@ -671,6 +712,37 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
|
||||
void Nothing(PlayerActionEvent caller) { }
|
||||
|
||||
private void BoxColorUpdate()
|
||||
{
|
||||
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)
|
||||
{
|
||||
var allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("theDazzles", new string[] { "boxColor" }).FindAll(x => x.beat < beat);
|
||||
if (allEventsBeforeBeat.Count > 0)
|
||||
{
|
||||
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEvent = allEventsBeforeBeat[^1];
|
||||
ChangeBoxColor(lastEvent.beat, lastEvent.length, lastEvent["extStart"], lastEvent["extEnd"], lastEvent["intStart"], lastEvent["intEnd"], lastEvent["wallStart"], lastEvent["wallEnd"], lastEvent["roofStart"], lastEvent["roofEnd"], lastEvent["ease"]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGameSwitch(double beat)
|
||||
{
|
||||
PersistColor(beat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user