Space Dance and Crop Stomp visual improvements + canvasScroll (#450)

* sprites1

* papapapunch

* dancers sheet done

* crop stomp

* Particulate

* Added veggie bag and particle to crop stomp, wip though

* Space dance scrolling background has been added

* cool

* Canvas Scroll hype

* Canvas scroll implemented in space soccer

* 4k

* gramps wip

* more

* assbun conflict fixed + long hair fix

* Space dance bop modernization and fixes

* ok

* sprites done

* wait.

* fixed space dance stuff

* Made miss return to idle

* catchy tune 3

* epic

---------

Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
Co-authored-by: minenice55 <star.elementa@gmail.com>
This commit is contained in:
Rapandrasmus
2023-06-06 20:59:56 +02:00
committed by GitHub
parent c5f5b6d800
commit efa8378797
90 changed files with 9459 additions and 1392 deletions

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using static HeavenStudio.Games.SpaceDance;
using HeavenStudio.Common;
namespace HeavenStudio.Games.Loaders
{
@ -65,23 +66,18 @@ namespace HeavenStudio.Games.Loaders
new Param("toggle", false, "Instant", "Should the background instantly change color?")
}
},
new GameAction("bop", "Single Bop")
new GameAction("bop", "Bop")
{
function = delegate { SpaceDance.instance.Bop(); SpaceDance.instance.GrampsBop(eventCaller.currentEntity["gramps"]); },
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.EpicBop(e.beat, e.length, e["auto"], e["bop"], e["grampsAuto"], e["gramps"]); },
parameters = new List<Param>()
{
new Param("gramps", false, "Gramps Bop", "Should Space Gramps bop with the dancers?")
}
},
new GameAction("bopToggle", "Bop Toggle")
{
function = delegate { SpaceDance.instance.shouldBop = eventCaller.currentEntity["toggle"]; SpaceDance.instance.spaceGrampsShouldBop = eventCaller.currentEntity["gramps"]; },
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("toggle", true, "Should bop?", "Should the dancers bop?"),
new Param("gramps", false, "Gramps Bop", "Should Space Gramps bop with the dancers?")
}
new Param("bop", true, "Dancers Bop", "Should the dancers bop?"),
new Param("auto", false, "Dancers Bop (Auto)", "Should the dancers auto bop?"),
new Param("gramps", false, "Gramps Bop", "Should Space Gramps bop with the dancers?"),
new Param("grampsAuto", false, "Gramps Bop (Auto)", "Should Space Gramps auto bop with the dancers?")
},
resizable = true,
defaultLength = 4f
},
new GameAction("grampsAnims", "Space Gramps Animations")
{
@ -92,7 +88,16 @@ namespace HeavenStudio.Games.Loaders
new Param("toggle", true, "Looping", "Should the animation loop?"),
new Param("type", SpaceDance.GrampsAnimationType.Talk, "Which animation?", "Which animation should space gramps do?")
}
}
},
new GameAction("scroll", "Scrolling Background")
{
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.UpdateScrollSpeed(e["x"], e["y"]); },
defaultLength = 1f,
parameters = new List<Param>() {
new Param("x", new EntityTypes.Float(-5f, 5f, 0), "Horizontal", "How fast does the background move horizontally?"),
new Param("y", new EntityTypes.Float(-5f, 5f, 0), "Vertical", "How fast does the background move vertically?"),
}
},
},
new List<string>() {"agb", "normal"},
"agbspacedance", "jp",
@ -112,7 +117,7 @@ namespace HeavenStudio.Games
{
get
{
ColorUtility.TryParseHtmlString("#0014D6", out _defaultBGColor);
ColorUtility.TryParseHtmlString("#0029D6", out _defaultBGColor);
return _defaultBGColor;
}
}
@ -138,7 +143,7 @@ namespace HeavenStudio.Games
public Animator Gramps;
public Animator Hit;
public GameObject Player;
public bool shouldBop = false;
[NonSerialized] public bool shouldBop = true;
bool canBop = true;
bool grampsCanBop = true;
public bool spaceGrampsShouldBop = false;
@ -149,6 +154,13 @@ namespace HeavenStudio.Games
bool grampsLoopingAnim;
bool grampsSniffing;
[SerializeField] CanvasScroll scroll;
float scrollBeat;
float scrollOffsetX;
float scrollOffsetY;
float currentScrollLengthX;
float currentScrollLengthY;
public GameEvent bop = new GameEvent();
public static SpaceDance instance;
@ -165,13 +177,17 @@ namespace HeavenStudio.Games
var cond = Conductor.instance;
if (cond.isPlaying && !cond.isPaused)
{
float normalizedX = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthX;
float normalizedY = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthY;
scroll.NormalizedX = -scrollOffsetX - normalizedX;
scroll.NormalizedY = -scrollOffsetY - normalizedY;
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
{
if (shouldBop && canBop)
if (shouldBop)
{
Bop();
}
if (spaceGrampsShouldBop && grampsCanBop)
if (spaceGrampsShouldBop)
{
GrampsBop();
}
@ -199,22 +215,34 @@ namespace HeavenStudio.Games
{
Jukebox.PlayOneShotGame("spaceDance/inputBad");
DancerP.DoScaledAnimationAsync("PunchDo", 0.5f);
Gramps.Play("GrampsOhFuck", 0, 0);
// Look at this later, sound effect has some weird clipping on it sometimes?? popping. like. fucking popopop idk why its doing that its fine theres no sample weirdness ughh
}
if (PlayerInput.GetSpecificDirectionDown(1) && !IsExpectingInputNow(InputType.DIRECTION_RIGHT_DOWN))
{
DancerP.DoScaledAnimationAsync("TurnRightDo", 0.5f);
Jukebox.PlayOneShotGame("spaceDance/inputBad");
Gramps.Play("GrampsOhFuck", 0, 0);
}
if (PlayerInput.GetSpecificDirectionDown(2) && !IsExpectingInputNow(InputType.DIRECTION_DOWN_DOWN))
{
DancerP.DoScaledAnimationAsync("SitDownDo", 0.5f);
Jukebox.PlayOneShotGame("spaceDance/inputBad");
Gramps.Play("GrampsOhFuck", 0, 0);
}
}
}
}
public void UpdateScrollSpeed(float scrollSpeedX, float scrollSpeedY)
{
scrollOffsetX = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthX;
scrollOffsetY = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthY;
currentScrollLengthX = scrollSpeedX;
currentScrollLengthY = scrollSpeedY;
scrollBeat = Time.realtimeSinceStartup;
}
public void GrampsAnimations(float beat, int type, bool looping)
{
switch (type)
@ -402,7 +430,7 @@ namespace HeavenStudio.Games
Dancer3.DoScaledAnimationAsync("TurnRightDo", 0.5f);
if (grampsTurns) Gramps.DoScaledAnimationAsync("GrampsTurnRightDo", 0.5f);
}),
new BeatAction.Action(beat + 1.99f, delegate { canBop = true; grampsCanBop = true; }),
new BeatAction.Action(beat + 1.5f, delegate { canBop = true; grampsCanBop = true; }),
});
}
@ -467,7 +495,7 @@ namespace HeavenStudio.Games
Dancer3.DoScaledAnimationAsync("SitDownDo", 0.5f);
if (grampsSits) Gramps.DoScaledAnimationAsync("GrampsSitDownDo", 0.5f);
}),
new BeatAction.Action(beat + 1.99f, delegate { canBop = true; grampsCanBop = true; }),
new BeatAction.Action(beat + 1.5f, delegate { canBop = true; grampsCanBop = true; }),
});
}
@ -558,22 +586,41 @@ namespace HeavenStudio.Games
}
public void EpicBop(float beat, float length, bool autoDancers, bool dancers, bool autoGramps, bool gramps)
{
shouldBop = autoDancers;
spaceGrampsShouldBop = autoGramps;
if (dancers || gramps)
{
List<BeatAction.Action> bops = new List<BeatAction.Action>();
for (int i = 0; i < length; i++)
{
if (dancers)
{
bops.Add(new BeatAction.Action(beat + i, delegate { Bop(); }));
}
if (gramps)
{
bops.Add(new BeatAction.Action(beat + i, delegate { GrampsBop(); }));
}
}
BeatAction.New(instance.gameObject, bops);
}
}
public void Bop()
{
canBop = true;
if (!canBop) return;
DancerP.DoScaledAnimationAsync("Bop", 0.5f);
Dancer1.DoScaledAnimationAsync("Bop", 0.5f);
Dancer2.DoScaledAnimationAsync("Bop", 0.5f);
Dancer3.DoScaledAnimationAsync("Bop", 0.5f);
}
public void GrampsBop(bool forceBop = false)
public void GrampsBop()
{
if (spaceGrampsShouldBop || forceBop)
{
grampsCanBop = true;
Gramps.DoScaledAnimationAsync("GrampsBop", 0.5f);
}
if (!grampsCanBop) return;
Gramps.DoScaledAnimationAsync("GrampsBop", 0.5f);
}
public void ChangeBackgroundColor(Color color, float beats)
@ -622,7 +669,7 @@ namespace HeavenStudio.Games
Jukebox.PlayOneShotGame("spaceDance/inputBad2");
DancerP.DoScaledAnimationAsync("Ouch", 0.5f);
Hit.Play("HitTurn", -1, 0);
Gramps.DoScaledAnimationAsync("GrampsOhFuck", 0.5f);
Gramps.DoScaledAnimationAsync("GrampsMiss", 0.5f);
}
public void JustSit(PlayerActionEvent caller, float state)
@ -648,7 +695,7 @@ namespace HeavenStudio.Games
Jukebox.PlayOneShotGame("spaceDance/inputBad2");
DancerP.DoScaledAnimationAsync("Ouch", 0.5f);
Hit.Play("HitSit", -1, 0);
Gramps.DoScaledAnimationAsync("GrampsOhFuck", 0.5f);
Gramps.DoScaledAnimationAsync("GrampsMiss", 0.5f);
}
public void JustPunch(PlayerActionEvent caller, float state)
@ -674,7 +721,7 @@ namespace HeavenStudio.Games
Jukebox.PlayOneShotGame("spaceDance/inputBad2");
DancerP.DoScaledAnimationAsync("Ouch", 0.5f);
Hit.Play("HitPunch", -1, 0);
Gramps.DoScaledAnimationAsync("GrampsOhFuck", 0.5f);
Gramps.DoScaledAnimationAsync("GrampsMiss", 0.5f);
}
public void Empty(PlayerActionEvent caller) { }