mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:37:37 +02:00
Added "Set Mii" to Drumming Practice
This commit is contained in:
@ -10,6 +10,19 @@ namespace RhythmHeavenMania.Games.DrummingPractice
|
||||
{
|
||||
public class DrummingPractice : Minigame
|
||||
{
|
||||
public enum MiiType
|
||||
{
|
||||
GuestA,
|
||||
GuestB,
|
||||
GuestC,
|
||||
GuestD,
|
||||
GuestE,
|
||||
GuestF,
|
||||
Matt,
|
||||
Tsunku,
|
||||
Marshal
|
||||
}
|
||||
|
||||
[Header("References")]
|
||||
public SpriteRenderer backgroundGradient;
|
||||
public Drummer player;
|
||||
@ -30,19 +43,7 @@ namespace RhythmHeavenMania.Games.DrummingPractice
|
||||
// TODO: Move this to OnGameSwitch() when functional?
|
||||
private void Start()
|
||||
{
|
||||
player.mii = UnityEngine.Random.Range(0, player.miiFaces.Count);
|
||||
do
|
||||
{
|
||||
leftDrummer.mii = UnityEngine.Random.Range(0, leftDrummer.miiFaces.Count);
|
||||
}
|
||||
while (leftDrummer.mii == player.mii);
|
||||
do
|
||||
{
|
||||
rightDrummer.mii = UnityEngine.Random.Range(0, rightDrummer.miiFaces.Count);
|
||||
}
|
||||
while (rightDrummer.mii == leftDrummer.mii || rightDrummer.mii == player.mii);
|
||||
|
||||
SetFaces(0);
|
||||
SetMiis(UnityEngine.Random.Range(0, player.miiFaces.Count));
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@ -94,5 +95,31 @@ namespace RhythmHeavenMania.Games.DrummingPractice
|
||||
rightDrummer.SetFace(type);
|
||||
}
|
||||
|
||||
public void SetMiis(int playerFace, bool all = false)
|
||||
{
|
||||
player.mii = playerFace;
|
||||
|
||||
if (all)
|
||||
{
|
||||
leftDrummer.mii = playerFace;
|
||||
rightDrummer.mii = playerFace;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
leftDrummer.mii = UnityEngine.Random.Range(0, leftDrummer.miiFaces.Count);
|
||||
}
|
||||
while (leftDrummer.mii == player.mii);
|
||||
do
|
||||
{
|
||||
rightDrummer.mii = UnityEngine.Random.Range(0, rightDrummer.miiFaces.Count);
|
||||
}
|
||||
while (rightDrummer.mii == leftDrummer.mii || rightDrummer.mii == player.mii);
|
||||
}
|
||||
|
||||
SetFaces(0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -388,6 +388,11 @@ namespace RhythmHeavenMania
|
||||
{
|
||||
new GameAction("bop", delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetBop(e.beat, e.length); }, 0.5f, true),
|
||||
new GameAction("drum", delegate { DrummingPractice.instance.Prepare(eventCaller.currentEntity.beat); }, 2f),
|
||||
new GameAction("set mii", delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetMiis(e.type, e.toggle); }, 0.5f, parameters: new List<Param>()
|
||||
{
|
||||
new Param("type", DrummingPractice.MiiType.GuestA, "Mii", "The Mii that the player will control"),
|
||||
new Param("toggle", false, "Set All", "Whether all Miis should be set")
|
||||
}),
|
||||
|
||||
}),
|
||||
/*new Minigame("spaceDance", "Space Dance", "B888F8", new List<GameAction>()
|
||||
|
Reference in New Issue
Block a user