Event redesign

This commit is contained in:
Rapandrasmus 2023-01-26 22:47:13 +01:00
parent 2fa8740056
commit 5ccceb153f

View file

@ -12,26 +12,29 @@ namespace HeavenStudio.Games.Loaders
{
return new Minigame("ringside", "Ringside \n<color=#eb5454>[INITIALIZATION ONLY]</color>", "WUTRU3", false, false, new List<GameAction>()
{
new GameAction("wubbaDubba", "Wubba Dubba Dubba")
new GameAction("question", "Question")
{
function = delegate {var e = eventCaller.currentEntity; Ringside.instance.Question(e.beat); },
defaultLength = 1.25f
},
new GameAction("thatTrue", "That True?")
{
function = delegate {var e = eventCaller.currentEntity; Ringside.instance.ThatTrue(e.beat); },
defaultLength = 0.75f
},
new GameAction("wubbaDubbaAlt", "Wub Dubba Dubba")
{
function = delegate {var e = eventCaller.currentEntity; Ringside.instance.QuestionAlt(e.beat); },
defaultLength = 1.25f
function = delegate {var e = eventCaller.currentEntity; Ringside.instance.Question(e.beat, e["alt"]); },
parameters = new List<Param>()
{
new Param("alt", false, "Alt", "Whether the alt voice line should be used or not.")
},
defaultLength = 4f
},
new GameAction("woahYouGoBigGuy", "Woah You Go Big Guy!")
{
function = delegate {var e = eventCaller.currentEntity; Ringside.instance.BigGuy(e.beat); },
defaultLength = 4f
},
new GameAction("poseForTheFans", "Pose For The Fans!")
{
function = delegate {var e = eventCaller.currentEntity; Ringside.PoseForTheFans(e.beat, e["and"]); },
parameters = new List<Param>()
{
new Param("and", false, "And", "Whether the And voice line should be said or not.")
},
defaultLength = 4f
},
});
}
}
@ -63,35 +66,38 @@ namespace HeavenStudio.Games
{
if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
{
wrestlerAnim.DoScaledAnimationAsync("Ye", 0.5f);
wrestlerAnim.Play("Ye", 0, 0);
Jukebox.PlayOneShotGame($"ringside/ye{UnityEngine.Random.Range(1, 4)}");
}
}
}
public void Question(float beat)
public void Question(float beat, bool alt)
{
MultiSound.Play(new MultiSound.Sound[]
if (alt)
{
new MultiSound.Sound($"ringside/wubba{currentQuestion}-1", beat),
new MultiSound.Sound($"ringside/wubba{currentQuestion}-2", beat + 0.25f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-1", beat + 0.5f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-2", beat + 0.75f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-3", beat + 1f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-4", beat + 1.25f),
}, forcePlay: true);
}
public void QuestionAlt(float beat)
{
MultiSound.Play(new MultiSound.Sound[]
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound($"ringside/wub{currentQuestion}", beat),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-1", beat + 0.5f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-2", beat + 0.75f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-3", beat + 1f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-4", beat + 1.25f),
}, forcePlay: true);
}
else
{
new MultiSound.Sound($"ringside/wub{currentQuestion}", beat),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-1", beat + 0.5f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-2", beat + 0.75f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-3", beat + 1f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-4", beat + 1.25f),
}, forcePlay: true);
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound($"ringside/wubba{currentQuestion}-1", beat),
new MultiSound.Sound($"ringside/wubba{currentQuestion}-2", beat + 0.25f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-1", beat + 0.5f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-2", beat + 0.75f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-3", beat + 1f),
new MultiSound.Sound($"ringside/dubba{currentQuestion}-4", beat + 1.25f),
}, forcePlay: true);
}
ThatTrue(beat + 1.25f);
}
public void ThatTrue(float beat)
@ -137,6 +143,27 @@ namespace HeavenStudio.Games
}
}
public static void PoseForTheFans(float beat, bool and)
{
if (and)
{
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("ringside/poseAnd", beat - 0.5f),
}, forcePlay: true);
}
if (GameManager.instance.currentGame != "ringside") return;
int poseLineRandom = UnityEngine.Random.Range(1, 3);
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound($"ringside/pose{poseLineRandom}", beat),
new MultiSound.Sound($"ringside/for{poseLineRandom}", beat + 0.5f),
new MultiSound.Sound($"ringside/the{poseLineRandom}", beat + 0.75f),
new MultiSound.Sound($"ringside/fans{poseLineRandom}", beat + 1f),
}, forcePlay: true);
Ringside.instance.ScheduleInput(beat, 2f, InputType.STANDARD_ALT_DOWN, Ringside.instance.JustPoseForTheFans, Ringside.instance.MissPose, Ringside.instance.Nothing);
}
public void JustQuestion(PlayerActionEvent caller, float state)
{
if (state >= 1f || state <= -1f)
@ -148,7 +175,7 @@ namespace HeavenStudio.Games
public void SuccessQuestion()
{
wrestlerAnim.DoScaledAnimationAsync("Ye", 0.5f);
wrestlerAnim.Play("Ye", 0, 0);
Jukebox.PlayOneShotGame($"ringside/ye{UnityEngine.Random.Range(1, 4)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
@ -188,9 +215,32 @@ namespace HeavenStudio.Games
});
}
public void JustPoseForTheFans(PlayerActionEvent caller, float state)
{
if (state >= 1f || state <= -1f)
{
return;
}
SuccessPoseForTheFans();
}
public void SuccessPoseForTheFans()
{
Jukebox.PlayOneShotGame($"ringside/yell{UnityEngine.Random.Range(1, 7)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeats + 1f, delegate { Jukebox.PlayOneShotGame("ringside/poseCamera"); }),
});
}
public void Miss(PlayerActionEvent caller)
{
}
public void MissPose(PlayerActionEvent caller)
{
}
public void Nothing(PlayerActionEvent caller){}