This commit is contained in:
Rapandrasmus
2023-01-31 17:16:01 +01:00
committed by GitHub
parent 3d3575301f
commit 99d987065d
5 changed files with 49 additions and 6 deletions

View File

@ -68,8 +68,10 @@ namespace HeavenStudio.Games
public class Spaceball : Minigame
{
public enum BallType {
Baseball,
Onigiri
Baseball = 0,
Onigiri = 1,
Alien = 2,
Tacobell = 3,
}
public enum CostumeType {
@ -231,9 +233,20 @@ namespace HeavenStudio.Games
Jukebox.PlayOneShotGame("spaceball/shoot");
}
if (type == 1)
ball.GetComponent<SpaceballBall>().Sprite.sprite = BallSprites[type];
switch(type)
{
ball.GetComponent<SpaceballBall>().Sprite.sprite = BallSprites[1];
case (int)BallType.Baseball:
break;
case (int)BallType.Onigiri:
ball.transform.localScale = new Vector3(1.2f, 1.2f, 1);
break;
case (int)BallType.Alien:
break;
case (int)BallType.Tacobell:
ball.transform.localScale = new Vector3(0.5f, 0.5f, 1);
ball.GetComponent<SpaceballBall>().isTacobell = true;
break;
}
Dispenser.GetComponent<Animator>().Play("DispenserShoot", 0, 0);

View File

@ -16,6 +16,7 @@ namespace HeavenStudio.Games.Scripts_Spaceball
public float startBeat;
public bool high;
public bool isTacobell;
public Transform Holder;
public SpriteRenderer Sprite;
@ -89,6 +90,10 @@ namespace HeavenStudio.Games.Scripts_Spaceball
hitPos = Holder.localPosition;
hitRot = Holder.eulerAngles.z;
if (isTacobell)
{
Jukebox.PlayOneShotGame("spaceball/tacobell");
}
Jukebox.PlayOneShotGame("spaceball/hit");
// jank fix for a bug with autoplay - freeform