This commit is contained in:
Rapandrasmus 2023-01-31 17:16:01 +01:00 committed by GitHub
parent 3d3575301f
commit 99d987065d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 6 deletions

View File

@ -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:

Binary file not shown.

View File

@ -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:

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