Dynamic editor theme (WIP), read desc for more info

Spaceball has been improved, you can now hit multiple balls at a time. Fork Lifter and Karate Man need this update soon as well. No idea why I did it the way I did.

Time jumping also has been improved by pausing.

Dynamic editor themes for custom theme support, however that won't be implemented until later.
This commit is contained in:
Braedon
2022-01-13 21:33:51 -05:00
parent 38b8b6737d
commit 8760412bb2
18 changed files with 539 additions and 66 deletions

View File

@ -58,37 +58,7 @@ namespace RhythmHeavenMania.Games.Spaceball
{
bool canHit = (EligibleHits.Count > 0) && (currentHitInList < EligibleHits.Count);
if (canHit)
{
if (EligibleHits[currentHitInList].perfect)
{
Jukebox.PlayOneShotGame("spaceball/hit");
EligibleHits[currentHitInList].gameObject.GetComponent<SpaceballBall>().Holder.transform.DOLocalMove(new Vector3(Random.Range(5, 18), 0, -600), 4f).SetEase(Ease.Linear);
EligibleHits[currentHitInList].gameObject.GetComponent<SpaceballBall>().Holder.transform.GetChild(0).gameObject.AddComponent<Rotate>().rotateSpeed = -245;
EligibleHits[currentHitInList].gameObject.GetComponent<SpaceballBall>().enabled = false;
EligibleHits[currentHitInList].gameObject.GetComponent<Animator>().enabled = false;
}
else
{
EligibleHits[currentHitInList].gameObject.GetComponent<SpaceballBall>().Holder.transform.GetChild(0).gameObject.AddComponent<Rotate>().rotateSpeed = -55;
EligibleHits[currentHitInList].gameObject.GetComponent<SpaceballBall>().enabled = false;
EligibleHits[currentHitInList].gameObject.GetComponent<Animator>().enabled = false;
Rigidbody2D rb = EligibleHits[currentHitInList].gameObject.AddComponent<Rigidbody2D>();
rb.bodyType = RigidbodyType2D.Dynamic;
rb.AddForce(transform.up * 1100);
rb.AddForce(transform.right * 400);
rb.gravityScale = 9;
Jukebox.PlayOneShot("miss");
}
RemoveBall();
}
else
Jukebox.PlayOneShotGame("spaceball/swing");
Jukebox.PlayOneShotGame("spaceball/swing");
anim.Play("Swing", 0, 0);
}
@ -97,14 +67,5 @@ namespace RhythmHeavenMania.Games.Spaceball
{
PlayerSprite.sprite = PlayerSpriteSheets[costume].sprites[id];
}
private void RemoveBall()
{
if (currentHitInList < EligibleHits.Count)
{
EligibleHits.Remove(EligibleHits[currentHitInList]);
currentHitInList++;
}
}
}
}