Karate Joe hits Cooking Pot with right hand + code cleanup

Also Taco Bell now plays the rock hit sound on top of the bell sound :)
This commit is contained in:
Carson Kompon 2022-03-02 23:23:20 -05:00
parent 752307fa64
commit 7cc7ffd691
5 changed files with 23 additions and 15 deletions

View file

@ -17797,9 +17797,9 @@ MonoBehaviour:
- {fileID: -3530312539838775474, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: -3530312539838775474, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: 8671423413994339737, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 8671423413994339737, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: -6341196331951941137, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: -6341196331951941137, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: -6283416824598814145, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: 6243727673011286339, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 6243727673011286339, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: -8767211005568948338, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: -8767211005568948338, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: -6283416824598814145, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
BarrelSprites: BarrelSprites:
- {fileID: 6524922379630696755, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 6524922379630696755, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: 1156572009758090512, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 1156572009758090512, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
@ -17809,6 +17809,8 @@ MonoBehaviour:
CookingPotSprites: CookingPotSprites:
- {fileID: 6243727673011286339, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 6243727673011286339, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: 561377664857987667, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 561377664857987667, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
OtherSprites:
- {fileID: -6283416824598814145, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
BGSprites: BGSprites:
- Sprites: - Sprites:
- {fileID: 21300000, guid: 72431c7c58f54e848bcb7527635bb72b, type: 3} - {fileID: 21300000, guid: 72431c7c58f54e848bcb7527635bb72b, type: 3}

View file

@ -12,8 +12,6 @@ namespace RhythmHeavenMania.Games.KarateMan
[Header("Components")] [Header("Components")]
public Animator anim; public Animator anim;
public GameObject HitEffect; public GameObject HitEffect;
public ParticleSystem HitParticle;
public ParticleSystem RockParticle;
public GameObject BulbHit; public GameObject BulbHit;
[SerializeField] private SpriteRenderer head; [SerializeField] private SpriteRenderer head;
[SerializeField] private Sprite[] heads; [SerializeField] private Sprite[] heads;
@ -268,7 +266,7 @@ namespace RhythmHeavenMania.Games.KarateMan
} }
else else
{ {
if (p.type == 2 || p.type == 3 || p.type == 4 || p.type == 6) if (p.type == 2 || p.type == 3 || p.type == 4 || p.type == 6 || p.type == 999)
{ {
punchLeft = false; punchLeft = false;
} }

View file

@ -14,9 +14,10 @@ namespace RhythmHeavenMania.Games.KarateMan
Pot = 0, Pot = 0,
Rock = 2, Rock = 2,
Ball = 3, Ball = 3,
CookingPot = 7, CookingPot = 6,
Alien = 8, Alien = 7,
TacoBell = 6,
TacoBell = 999
} }
public enum LightBulbType public enum LightBulbType
@ -68,6 +69,7 @@ namespace RhythmHeavenMania.Games.KarateMan
public Sprite[] ObjectSprites; public Sprite[] ObjectSprites;
public Sprite[] BarrelSprites; public Sprite[] BarrelSprites;
public Sprite[] CookingPotSprites; public Sprite[] CookingPotSprites;
public Sprite[] OtherSprites;
public List<BGSpriteC> BGSprites; public List<BGSpriteC> BGSprites;
public SpriteRenderer BGSprite; public SpriteRenderer BGSprite;
@ -155,7 +157,9 @@ namespace RhythmHeavenMania.Games.KarateMan
p.createBeat = beat; p.createBeat = beat;
p.isThrown = true; p.isThrown = true;
p.type = type; p.type = type;
p.Sprite.GetComponent<SpriteRenderer>().sprite = ObjectSprites[type];
if(type <= ObjectSprites.Length)
p.Sprite.GetComponent<SpriteRenderer>().sprite = ObjectSprites[type];
if (combo) if (combo)
{ {
@ -219,21 +223,22 @@ namespace RhythmHeavenMania.Games.KarateMan
outSnd = "karateman/objectOut"; outSnd = "karateman/objectOut";
else else
outSnd = "karateman/offbeatObjectOut"; outSnd = "karateman/offbeatObjectOut";
p.hitSnd = "karateman/tacobell"; p.hitSnd = "karateman/cookingPot";
break; break;
case 7: case 7:
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f) if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
outSnd = "karateman/objectOut"; outSnd = "karateman/objectOut";
else else
outSnd = "karateman/offbeatObjectOut"; outSnd = "karateman/offbeatObjectOut";
p.hitSnd = "karateman/cookingPot"; p.hitSnd = "karateman/alienHit";
break; break;
case 8: case 999:
p.Sprite.GetComponent<SpriteRenderer>().sprite = OtherSprites[0];
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f) if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
outSnd = "karateman/objectOut"; outSnd = "karateman/objectOut";
else else
outSnd = "karateman/offbeatObjectOut"; outSnd = "karateman/offbeatObjectOut";
p.hitSnd = "karateman/alienHit"; p.hitSnd = "karateman/tacobell";
break; break;
} }

View file

@ -71,7 +71,7 @@ namespace RhythmHeavenMania.Games.KarateMan
else else
hitLength = 14f; hitLength = 14f;
if (type == 7) if (type == 6)
CookingPotLid.SetActive(true); CookingPotLid.SetActive(true);
/*if (combo) /*if (combo)
@ -284,11 +284,14 @@ namespace RhythmHeavenMania.Games.KarateMan
case 4: case 4:
BarrelDestroy(false); BarrelDestroy(false);
break; break;
case 7: case 6:
// TODO: Rock destroy particle effect // TODO: Rock destroy particle effect
CookingPotLid.SetActive(false); CookingPotLid.SetActive(false);
CookingPotDestroy(); CookingPotDestroy();
break; break;
case 999:
Jukebox.PlayOneShotGame("karateman/rockHit");
break;
} }
if (!kick) if (!kick)

View file

@ -263,7 +263,7 @@ namespace RhythmHeavenMania
new GameAction("pot", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 0); }, 2, hidden: true), new GameAction("pot", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 0); }, 2, hidden: true),
new GameAction("rock", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 2); }, 2, hidden: true), new GameAction("rock", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 2); }, 2, hidden: true),
new GameAction("ball", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 3); }, 2, hidden: true), new GameAction("ball", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 3); }, 2, hidden: true),
new GameAction("tacobell", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 6); }, 2, hidden: true), new GameAction("tacobell", delegate { KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 999); }, 2, hidden: true),
new GameAction("hit4", delegate { KarateMan.instance.Hit4(eventCaller.currentEntity.beat); }, hidden: true), new GameAction("hit4", delegate { KarateMan.instance.Hit4(eventCaller.currentEntity.beat); }, hidden: true),
new GameAction("bgfxon", delegate { KarateMan.instance.SetBackgroundFX(KarateMan.BackgroundFXType.Sunburst); }, hidden: true), new GameAction("bgfxon", delegate { KarateMan.instance.SetBackgroundFX(KarateMan.BackgroundFXType.Sunburst); }, hidden: true),
new GameAction("bgfxoff", delegate { KarateMan.instance.SetBackgroundFX(KarateMan.BackgroundFXType.None); }, hidden: true), new GameAction("bgfxoff", delegate { KarateMan.instance.SetBackgroundFX(KarateMan.BackgroundFXType.None); }, hidden: true),