Minigame "Feel" Adjustments and Additions (#258)

* add alt cue to fan club

* add effects to rhythm somen

update rhythm somen hitsound
add near miss interaction for rhythm somen

* adjust trick on the class animation

* adjust fan club spectator animation timing

fix bug with legacy beatmap conversion
This commit is contained in:
minenice55
2023-02-04 22:05:43 -05:00
committed by GitHub
parent 495cc5ad4c
commit b5222b15c8
45 changed files with 9255 additions and 413 deletions

View File

@ -71,7 +71,15 @@ namespace HeavenStudio
{
get
{
return typeof(Entity).GetField(propertyName).GetValue(this);
try
{
return typeof(Entity).GetField(propertyName).GetValue(this);
}
catch (NullReferenceException ex)
{
UnityEngine.Debug.LogWarning($"{propertyName} doesn't exist in this Legacy Entity. Conversion needs to create this field... Exception log: {ex}");
return null;
}
}
set
{

View File

@ -250,6 +250,11 @@ namespace HeavenStudio
{
foreach (var param in action.parameters)
{
if (e[param.propertyName] == null)
{
dynamicData.Add(param.propertyName, param.parameter);
continue;
}
type = param.parameter.GetType();
pType = e[param.propertyName].GetType();
// Debug.Log($"adding parameter {param.propertyName} of type {type}");

View File

@ -36,15 +36,16 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("I suppose", "I Suppose!")
{
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallKamone(e.beat, e["toggle"], 0, e["type"]); },
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallKamone(e.beat, e["toggle"], 0, e["type"], e["alt"]); },
defaultLength = 6,
parameters = new List<Param>()
{
new Param("type", FanClub.KamoneResponseType.Through, "Response type", "Type of response to use"),
new Param("toggle", false, "Disable call", "Disable the idol's call")
new Param("toggle", false, "Disable call", "Disable the idol's call"),
new Param("alt", false, "Alternate cue", "Use an alternate cue")
},
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnKamone(e.beat, e["toggle"], 0, e["type"]);},
preFunction = delegate { var e = eventCaller.currentEntity; FanClub.KamoneSound(e.beat, e["toggle"], 0, e["type"]); }
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnKamone(e.beat, e["toggle"], 0, e["type"], e["alt"]);},
preFunction = delegate { var e = eventCaller.currentEntity; FanClub.KamoneSound(e.beat, e["toggle"], 0, e["type"], e["alt"]); }
},
new GameAction("double clap", "Double Clap")
{
@ -173,6 +174,7 @@ namespace HeavenStudio.Games
private static float wantHais = Single.MinValue;
private static float wantKamone = Single.MinValue;
private static int wantKamoneType = (int) KamoneResponseType.Through;
private static bool wantKamoneAlt = false;
private static float wantBigReady = Single.MinValue;
public float idolJumpStartTime = Single.MinValue;
private bool hasJumped = false;
@ -265,7 +267,7 @@ namespace HeavenStudio.Games
}
if (wantKamone != Single.MinValue)
{
ContinueKamone(wantKamone, 0, wantKamoneType);
ContinueKamone(wantKamone, 0, wantKamoneType, wantKamoneAlt);
wantKamone = Single.MinValue;
}
if (wantBigReady != Single.MinValue)
@ -572,7 +574,7 @@ namespace HeavenStudio.Games
}
const float CALL_LENGTH = 2.5f;
public void CallKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
public void CallKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through, bool alt = false)
{
bool doJump = (responseType == (int) KamoneResponseType.Jump || responseType == (int) KamoneResponseType.JumpFast);
bool isBig = (responseType == (int) KamoneResponseType.ThroughFast || responseType == (int) KamoneResponseType.JumpFast);
@ -609,31 +611,32 @@ namespace HeavenStudio.Games
}),
});
PlaySoundSequence("fanClub", "crowd_kamone", beat + 2f);
PlaySoundSequence("fanClub", alt ? "crowd_iina" : "crowd_kamone", beat + 2f);
}
public static void WarnKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
public static void WarnKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through, bool alt = false)
{
wantKamone = beat;
wantKamoneType = responseType;
wantKamoneAlt = alt;
}
public static void KamoneSound(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
public static void KamoneSound(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through, bool alt = false)
{
if (noSound) return;
if (responseType == (int) KamoneResponseType.ThroughFast || responseType == (int) KamoneResponseType.JumpFast)
{
PlaySoundSequence("fanClub", "arisa_kamone_fast", beat);
PlaySoundSequence("fanClub", alt ? "arisa_iina_fast" : "arisa_kamone_fast", beat);
}
else
{
PlaySoundSequence("fanClub", "arisa_kamone", beat);
PlaySoundSequence("fanClub", alt ? "arisa_iina" : "arisa_kamone", beat);
}
}
public void ContinueKamone(float beat, int type = 0, int responseType = (int) KamoneResponseType.Through)
public void ContinueKamone(float beat, int type = 0, int responseType = (int) KamoneResponseType.Through, bool alt = false)
{
CallKamone(beat, true, type, responseType);
CallKamone(beat, true, type, responseType, alt);
}
const float BIGCALL_LENGTH = 2.75f;

View File

@ -161,9 +161,9 @@ namespace HeavenStudio.Games
GameManager.instance.AvgInputOffset = offset;
OnHit(this, (float) state);
CleanUp();
if (countsForAccuracy && !(noAutoplay || autoplayOnly))
if (countsForAccuracy && !(noAutoplay || autoplayOnly) && isEligible)
GameManager.instance.ScoreInputAccuracy(TimeToAccuracy(time), time > 1.0, 1.0);
CleanUp();
} else
{
Blank();

View File

@ -41,6 +41,7 @@ namespace HeavenStudio.Games
// using Scripts_RhythmSomen;
public class RhythmSomen : Minigame
{
[SerializeField] ParticleSystem splashEffect;
public Animator SomenPlayer;
public Animator FrontArm;
public Animator EffectHit;
@ -155,8 +156,17 @@ namespace HeavenStudio.Games
public void CatchSuccess(PlayerActionEvent caller, float state)
{
splashEffect.Play();
if (state >= 1f || state <= -1f)
{
Jukebox.PlayOneShotGame("rhythmSomen/somen_splash");
FrontArm.Play("ArmPluckNG", -1, 0);
EffectSweat.Play("BlobSweating", -1, 0);
return;
}
Jukebox.PlayOneShotGame("rhythmSomen/somen_catch");
FrontArm.Play("ArmPluck", -1, 0);
Jukebox.PlayOneShotGame("rhythmSomen/somen_catch_old", volume: 0.25f);
FrontArm.Play("ArmPluckOK", -1, 0);
EffectHit.Play("HitAppear", -1, 0);
}

View File

@ -138,6 +138,14 @@ namespace HeavenStudio.Games.Scripts_TrickClass
});
}
}
else
{
Jukebox.PlayOneShotGame(GetDodgeSound());
DoObjMiss();
game.PlayerThrough();
caller.isEligible = false;
game.ScoreMiss();
}
}
public void DodgeMiss(PlayerActionEvent caller)