diff --git a/Assets/Resources/Games/spaceball.prefab b/Assets/Resources/Games/spaceball.prefab index 373ee7f4..a28aefc0 100644 --- a/Assets/Resources/Games/spaceball.prefab +++ b/Assets/Resources/Games/spaceball.prefab @@ -744,7 +744,6 @@ MonoBehaviour: high: 0 Holder: {fileID: 6584942078379596564} Sprite: {fileID: 6584942078979342752} - refAnim: {fileID: 0} pitchLowCurve: {fileID: 6506079467901904364} pitchHighCurve: {fileID: 8317586085261478781} --- !u!1 &6584942079616426642 @@ -6348,7 +6347,11 @@ MonoBehaviour: BallsHolder: {fileID: 6584942079139059257} Dispenser: {fileID: 6584942078977133660} Dust: {fileID: 6584942080175284543} - BallSprites: [] + BallSprites: + - {fileID: 21300000, guid: fd733e2c15cee3c45833588b6ca7dbb9, type: 3} + - {fileID: 21300000, guid: 4a309d486a5074d4bbe8276af96a7466, type: 3} + - {fileID: 3906657198060525574, guid: de9e3e71d21bccc49b0f8973960575b1, type: 3} + - {fileID: -6283416824598814145, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} alien: {fileID: 6584942079671387193} --- !u!1 &7320610717660946107 GameObject: diff --git a/Assets/Resources/Sfx/games/spaceball/tacobell.ogg.meta b/Assets/Resources/Sfx/games/spaceball/tacobell.ogg.meta new file mode 100644 index 00000000..2048cd91 --- /dev/null +++ b/Assets/Resources/Sfx/games/spaceball/tacobell.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2e2b2952cac0add4c83de27abce29972 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Games/Spaceball/Spaceball.cs b/Assets/Scripts/Games/Spaceball/Spaceball.cs index 108ad24c..04fc9b7f 100644 --- a/Assets/Scripts/Games/Spaceball/Spaceball.cs +++ b/Assets/Scripts/Games/Spaceball/Spaceball.cs @@ -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().Sprite.sprite = BallSprites[type]; + switch(type) { - ball.GetComponent().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().isTacobell = true; + break; } Dispenser.GetComponent().Play("DispenserShoot", 0, 0); diff --git a/Assets/Scripts/Games/Spaceball/SpaceballBall.cs b/Assets/Scripts/Games/Spaceball/SpaceballBall.cs index 158addf4..04d5df27 100644 --- a/Assets/Scripts/Games/Spaceball/SpaceballBall.cs +++ b/Assets/Scripts/Games/Spaceball/SpaceballBall.cs @@ -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