mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-25 19:15:16 +00:00
Upbeat blip length (#675)
* Implementation actually implemented the slider, waiting on zeo's word for polish * Non-placeholder text ty zeo
This commit is contained in:
parent
d181109270
commit
ced59446a1
2 changed files with 9 additions and 5 deletions
|
@ -77,7 +77,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
function = delegate {
|
function = delegate {
|
||||||
var e = eventCaller.currentEntity;
|
var e = eventCaller.currentEntity;
|
||||||
MrUpbeat.instance.BlipEvents(e["letter"], e["shouldGrow"], e["resetBlip"], e["shouldBlip"]);
|
MrUpbeat.instance.BlipEvents(e["letter"], e["shouldGrow"], e["resetBlip"], e["shouldBlip"], e["blipLength"]);
|
||||||
},
|
},
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
|
@ -86,6 +86,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new Param("shouldGrow", true, "Grow Antenna", "Toggle if Mr. Upbeat's antennashould grow on every blip"),
|
new Param("shouldGrow", true, "Grow Antenna", "Toggle if Mr. Upbeat's antennashould grow on every blip"),
|
||||||
new Param("resetBlip", false, "Reset Antenna", "Toggle if Mr. Upbeat's antenna should reset"),
|
new Param("resetBlip", false, "Reset Antenna", "Toggle if Mr. Upbeat's antenna should reset"),
|
||||||
new Param("shouldBlip", true, "Should Blip", "Toggle if Mr. Upbeat's antenna should blip every offbeat."),
|
new Param("shouldBlip", true, "Should Blip", "Toggle if Mr. Upbeat's antenna should blip every offbeat."),
|
||||||
|
new Param("blipLength", new EntityTypes.Integer(0, 4, 4), "Text Blip Requirement", "Set how many blips it will take for the text to appear on Mr. Upbeat’s antenna."),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new GameAction("fourBeatCountInOffbeat", "4 Beat Count-In")
|
new GameAction("fourBeatCountInOffbeat", "4 Beat Count-In")
|
||||||
|
@ -356,12 +357,13 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BlipEvents(string inputLetter, bool shouldGrow, bool resetBlip, bool shouldBlip)
|
public void BlipEvents(string inputLetter, bool shouldGrow, bool resetBlip, bool shouldBlip, int blipLength)
|
||||||
{
|
{
|
||||||
if (resetBlip) man.blipSize = 0;
|
if (resetBlip) man.blipSize = 0;
|
||||||
man.shouldGrow = shouldGrow;
|
man.shouldGrow = shouldGrow;
|
||||||
man.blipString = inputLetter;
|
man.blipString = inputLetter;
|
||||||
man.shouldBlip = shouldBlip;
|
man.shouldBlip = shouldBlip;
|
||||||
|
man.blipLength = blipLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Count(int number)
|
public static void Count(int number)
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace HeavenStudio.Games.Scripts_MrUpbeat
|
||||||
public bool shouldGrow;
|
public bool shouldGrow;
|
||||||
public bool shouldBlip = true;
|
public bool shouldBlip = true;
|
||||||
public string blipString = "M";
|
public string blipString = "M";
|
||||||
|
public int blipLength = 4;
|
||||||
public bool canStep = false; // just disabled when you normally couldn't step, which is anything less than 2 beats before you would start stepping and any time after the Ding!
|
public bool canStep = false; // just disabled when you normally couldn't step, which is anything less than 2 beats before you would start stepping and any time after the Ding!
|
||||||
public bool canStepFromAnim = true; // disabled when stepping, then reenabled in the animation events. you can step JUST BARELY before the animation ends in fever
|
public bool canStepFromAnim = true; // disabled when stepping, then reenabled in the animation events. you can step JUST BARELY before the animation ends in fever
|
||||||
|
|
||||||
|
@ -57,12 +58,13 @@ namespace HeavenStudio.Games.Scripts_MrUpbeat
|
||||||
|
|
||||||
public void Blipping()
|
public void Blipping()
|
||||||
{
|
{
|
||||||
|
int blipLengthReal = blipLength - 4;
|
||||||
SoundByte.PlayOneShotGame("mrUpbeat/blip");
|
SoundByte.PlayOneShotGame("mrUpbeat/blip");
|
||||||
blipAnim.Play("Blip" + (blipSize + 1), 0, 0);
|
blipAnim.Play("Blip" + (blipSize + 1 - blipLengthReal), 0, 0);
|
||||||
blipText.gameObject.SetActive(blipSize >= 4);
|
blipText.gameObject.SetActive(blipSize - blipLengthReal >= 4);
|
||||||
|
|
||||||
blipText.text = blipString != "" ? blipString : "";
|
blipText.text = blipString != "" ? blipString : "";
|
||||||
if (shouldGrow && blipSize < 4) blipSize++;
|
if (shouldGrow && blipSize - blipLengthReal < 4) blipSize++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Step(bool isInput = false)
|
public void Step(bool isInput = false)
|
||||||
|
|
Loading…
Reference in a new issue