Bring in the rest of my script (#5)
* Add something that resembles whiffs and barelies They still use combinations of the rhre sounds and have no animations. * fix caller beat in multisound * Faulty Whale Stole code from clappy trio sign, the sfx now changes based on whether we have a whale
This commit is contained in:
parent
d853aa6306
commit
d8dcfb6cf1
|
@ -37,7 +37,17 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
function = delegate { HoleInOne.instance.DoMonkey(eventCaller.currentEntity.beat); },
|
function = delegate { HoleInOne.instance.DoMonkey(eventCaller.currentEntity.beat); },
|
||||||
defaultLength = 3.0f,
|
defaultLength = 3.0f,
|
||||||
}
|
},
|
||||||
|
new GameAction("whale", "Whale")
|
||||||
|
{
|
||||||
|
function = delegate { var e = eventCaller.currentEntity; HoleInOne.instance.Whale(e.beat, e.length, e["ease"], e["appear"]); },
|
||||||
|
parameters = new List<Param>()
|
||||||
|
{
|
||||||
|
new Param("appear", true, "Enter", "Toggle if the whale should enter or exit the scene."),
|
||||||
|
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
|
||||||
|
},
|
||||||
|
resizable = true
|
||||||
|
},
|
||||||
}//,
|
}//,
|
||||||
// new List<string>() { "rvl", "normal" },
|
// new List<string>() { "rvl", "normal" },
|
||||||
// "rvlgolf", "en",
|
// "rvlgolf", "en",
|
||||||
|
@ -55,12 +65,18 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
public Animator MonkeyAnim;
|
public Animator MonkeyAnim;
|
||||||
|
|
||||||
|
double whaleStartBeat;
|
||||||
|
float whaleLength;
|
||||||
|
Util.EasingFunction.Ease lastEase;
|
||||||
|
bool isWhale;
|
||||||
|
|
||||||
public static HoleInOne instance;
|
public static HoleInOne instance;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
HoleInOne.instance = this;
|
HoleInOne.instance = this;
|
||||||
SetupBopRegion("holeInOne", "bop", "toggle");
|
SetupBopRegion("holeInOne", "bop", "toggle");
|
||||||
|
isWhale = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnBeatPulse(double beat)
|
public override void OnBeatPulse(double beat)
|
||||||
|
@ -69,6 +85,15 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress))
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("holeInOne/hole1"); // temp miss sound. Should be: whiff sound
|
||||||
|
ScoreMiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void ToggleBop(double beat, float length, bool shouldBop, bool autoBop)
|
public void ToggleBop(double beat, float length, bool shouldBop, bool autoBop)
|
||||||
{
|
{
|
||||||
if (shouldBop)
|
if (shouldBop)
|
||||||
|
@ -86,11 +111,20 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Whale(double beat, float length, int ease, bool appear)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("clappyTrio/sign");
|
||||||
|
whaleStartBeat = beat;
|
||||||
|
whaleLength = length;
|
||||||
|
lastEase = (Util.EasingFunction.Ease)ease;
|
||||||
|
isWhale = appear;
|
||||||
|
}
|
||||||
|
|
||||||
public void DoMandrill(double beat)
|
public void DoMandrill(double beat)
|
||||||
{
|
{
|
||||||
//Mandrill Multisound
|
//Mandrill Multisound
|
||||||
ScheduleInput(beat, 3f, InputAction_BasicPress, MandrillSuccess, MandrillMiss, Whiff);
|
ScheduleInput(beat, 3f, InputAction_BasicPress, MandrillSuccess, MandrillMiss, Nothing);
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("holeInOne/mandrill1", beat),
|
new MultiSound.Sound("holeInOne/mandrill1", beat),
|
||||||
new MultiSound.Sound("holeInOne/mandrill2", beat + 1f),
|
new MultiSound.Sound("holeInOne/mandrill2", beat + 1f),
|
||||||
|
@ -110,7 +144,7 @@ namespace HeavenStudio.Games
|
||||||
public void DoMonkey(double beat)
|
public void DoMonkey(double beat)
|
||||||
{
|
{
|
||||||
//Monkey Multisound
|
//Monkey Multisound
|
||||||
ScheduleInput(beat, 2f, InputAction_BasicPress, MonkeySuccess, MonkeyMiss, Whiff);
|
ScheduleInput(beat, 2f, InputAction_BasicPress, MonkeySuccess, MonkeyMiss, Nothing);
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("holeInOne/monkey1", beat),
|
new MultiSound.Sound("holeInOne/monkey1", beat),
|
||||||
new MultiSound.Sound("holeInOne/monkey2", beat + 1f)
|
new MultiSound.Sound("holeInOne/monkey2", beat + 1f)
|
||||||
|
@ -126,8 +160,27 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public void MandrillSuccess(PlayerActionEvent caller, float state)
|
public void MandrillSuccess(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("holeInOne/mandrill4");
|
if (state >= 1f || state <= -1f)
|
||||||
MonkeyAnim.Play("MonkeySpin");
|
{
|
||||||
|
double beat = caller.startBeat + caller.timer;
|
||||||
|
|
||||||
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
|
new MultiSound.Sound("holeInOne/mandrill1", beat),// temp should be miss
|
||||||
|
new MultiSound.Sound("holeInOne/hole2", beat + 1f)// temp should be splash
|
||||||
|
});
|
||||||
|
MonkeyAnim.Play("MonkeySpin");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double beat = caller.startBeat + caller.timer;
|
||||||
|
int randomSuccess = UnityEngine.Random.Range(1,5);
|
||||||
|
|
||||||
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
|
new MultiSound.Sound("holeInOne/mandrill4", beat),
|
||||||
|
new MultiSound.Sound((isWhale) ? "holeInOne/whale" : ("holeInOne/hole" + randomSuccess), beat + 2f)
|
||||||
|
});
|
||||||
|
MonkeyAnim.Play("MonkeySpin");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,14 +192,27 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public void MonkeySuccess(PlayerActionEvent caller, float state)
|
public void MonkeySuccess(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
double beat = caller.timer;
|
if (state >= 1f || state <= -1f)
|
||||||
int randomSuccess = UnityEngine.Random.Range(1,5);
|
{
|
||||||
|
double beat = caller.startBeat + caller.timer;
|
||||||
|
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("holeInOne/monkey3", beat),
|
new MultiSound.Sound("holeInOne/mandrill1", beat),// temp should be miss
|
||||||
new MultiSound.Sound("holeInOne/hole" + randomSuccess, beat + 2f)
|
new MultiSound.Sound("holeInOne/hole2", beat + 1f)// temp should be splash
|
||||||
});
|
});
|
||||||
MonkeyAnim.Play("MonkeySpin");
|
MonkeyAnim.Play("MonkeySpin");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double beat = caller.startBeat + caller.timer;
|
||||||
|
int randomSuccess = UnityEngine.Random.Range(1,5);
|
||||||
|
|
||||||
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
|
new MultiSound.Sound("holeInOne/monkey3", beat),
|
||||||
|
new MultiSound.Sound((isWhale) ? "holeInOne/whale" : ("holeInOne/hole" + randomSuccess), beat + 2f)
|
||||||
|
});
|
||||||
|
MonkeyAnim.Play("MonkeySpin");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MonkeyMiss(PlayerActionEvent caller)
|
public void MonkeyMiss(PlayerActionEvent caller)
|
||||||
|
@ -155,9 +221,8 @@ namespace HeavenStudio.Games
|
||||||
MonkeyAnim.Play("MonkeySpin");
|
MonkeyAnim.Play("MonkeySpin");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Whiff(PlayerActionEvent caller)
|
public void Nothing(PlayerActionEvent caller)
|
||||||
{
|
{
|
||||||
MonkeyAnim.Play("MonkeyBop");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,6 +17,7 @@ MonoBehaviour:
|
||||||
DenseViewWidthThreshold: 512
|
DenseViewWidthThreshold: 512
|
||||||
_disableAutoReloadInBackground: 0
|
_disableAutoReloadInBackground: 0
|
||||||
ImportedScriptPaths:
|
ImportedScriptPaths:
|
||||||
|
|
||||||
- Assets/Scripts/Games/FanClub/NtrIdolFan.cs
|
- Assets/Scripts/Games/FanClub/NtrIdolFan.cs
|
||||||
- Assets/Scripts/LevelEditor/RemixPropertiesDialog/PropertyPrefabs/BoolChartPropertyPrefab.cs
|
- Assets/Scripts/LevelEditor/RemixPropertiesDialog/PropertyPrefabs/BoolChartPropertyPrefab.cs
|
||||||
- Assets/Scripts/Games/AirRally/AirRally.cs
|
- Assets/Scripts/Games/AirRally/AirRally.cs
|
||||||
|
|
Loading…
Reference in a new issue