mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 13:07:40 +02:00
First Contact & Tap Trial
First Contact: Live is now offbeat [alienSuccess] code block is a bit smaller Mission Control is now stretchable Tap Trial - Started working on coding the inputs - Animated monkey (tap, double, and triple (incomplete))
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@ -16,20 +17,27 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
new Param("toggle", true, "Bop", "Whether both will bop to the beat or not")
|
||||
}),
|
||||
new GameAction("and stop ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.AndStop(e.beat, e.toggle); }, 2.5f, false, new List<Param>()
|
||||
new GameAction("and stop ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.AndStop(e.beat, e.toggle); }, 2.5f, false,
|
||||
inactiveFunction: delegate { var e = eventCaller.currentEntity; DJSchool.WarnAndStop(e.beat, e.toggle); },
|
||||
parameters: new List<Param>()
|
||||
{
|
||||
new Param("toggle", true, "Ooh", "Whether or not the \"ooh\" sound should be played")
|
||||
}),
|
||||
new GameAction("break c'mon ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.BreakCmon(e.beat, e.type, e.toggle); }, 3f, false, new List<Param>()
|
||||
new GameAction("break c'mon ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.BreakCmon(e.beat, e.type, e.toggle); }, 3f, false,
|
||||
inactiveFunction: delegate { var e = eventCaller.currentEntity; DJSchool.WarnBreakCmon(e.beat, e.type, e.toggle); },
|
||||
parameters: new List<Param>()
|
||||
{
|
||||
new Param("type", DJSchool.DJVoice.Standard, "Voice", "The voice line to play"),
|
||||
new Param("toggle", true, "Ooh", "Whether or not the \"ooh\" sound should be played")
|
||||
}),
|
||||
new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 3f, false, new List<Param>()
|
||||
new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity.type, eventCaller.currentEntity.toggle); }, 3f, false, new List<Param>()
|
||||
{
|
||||
new Param("type", DJSchool.DJVoice.Standard, "Voice", "The voice line to play"),
|
||||
new Param("toggle", false, "Fast Hey", "Activate Remix 4 (DS) beat")
|
||||
}),
|
||||
new GameAction("dj voice lines", delegate { DJSchool.instance.voiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 2f, false, new List<Param>()
|
||||
new GameAction("dj voice lines", delegate { DJSchool.instance.voiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 2f, false,
|
||||
inactiveFunction: delegate { DJSchool.WarnDJVoiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); },
|
||||
parameters: new List<Param>()
|
||||
{
|
||||
new Param("type", DJSchool.DJVoiceLines.CheckItOut, "Voice Lines", "The voice line to play"),
|
||||
}),
|
||||
@ -66,9 +74,7 @@ namespace HeavenStudio.Games
|
||||
OhYeah,
|
||||
OhYeahAlt,
|
||||
Yay
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[Header("Components")]
|
||||
[SerializeField] private Student student;
|
||||
@ -95,6 +101,30 @@ namespace HeavenStudio.Games
|
||||
goBop = true;
|
||||
}
|
||||
|
||||
//For inactive game purposes
|
||||
static float wantBreak = Single.MinValue;
|
||||
static float wantAndStop = Single.MinValue;
|
||||
static float wantDJVoiceLines = Single.MinValue;
|
||||
|
||||
public override void OnGameSwitch(float beat)
|
||||
{
|
||||
if (wantBreak != Single.MinValue)
|
||||
{
|
||||
BreakCmon(wantBreak, 0, false, false);
|
||||
wantBreak = Single.MinValue;
|
||||
}
|
||||
else if(wantAndStop != Single.MinValue)
|
||||
{
|
||||
AndStop(wantAndStop, false, false);
|
||||
wantAndStop = Single.MinValue;
|
||||
}
|
||||
else if(wantDJVoiceLines != Single.MinValue)
|
||||
{
|
||||
voiceLines(wantDJVoiceLines, 0);
|
||||
wantDJVoiceLines = Single.MinValue;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
#region old script
|
||||
@ -205,7 +235,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
public void BreakCmon(float beat, int type, bool ooh)
|
||||
public void BreakCmon(float beat, int type, bool ooh, bool doSound = true)
|
||||
{
|
||||
if (djYellowHolding) return;
|
||||
|
||||
@ -224,17 +254,21 @@ namespace HeavenStudio.Games
|
||||
break;
|
||||
}
|
||||
|
||||
var sound = new MultiSound.Sound[]
|
||||
if (doSound)
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + 1f, offset: 0.030f),
|
||||
new MultiSound.Sound("", beat + 2f)
|
||||
};
|
||||
var sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + 1f, offset: 0.030f),
|
||||
new MultiSound.Sound("", beat + 2f)
|
||||
};
|
||||
|
||||
if (ooh)
|
||||
sound[2] = new MultiSound.Sound(sounds[2], beat + 2f);
|
||||
if (ooh)
|
||||
sound[2] = new MultiSound.Sound(sounds[2], beat + 2f);
|
||||
|
||||
MultiSound.Play(sound);
|
||||
MultiSound.Play(sound);
|
||||
}
|
||||
|
||||
|
||||
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
||||
{
|
||||
@ -250,20 +284,26 @@ namespace HeavenStudio.Games
|
||||
ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, student.OnHitHold, student.OnMissHold, student.OnEmpty);
|
||||
}
|
||||
|
||||
public void AndStop(float beat, bool ooh)
|
||||
|
||||
public void AndStop(float beat, bool ooh, bool doSound = true)
|
||||
{
|
||||
if (djYellowHolding) return;
|
||||
var sound = new MultiSound.Sound[]
|
||||
|
||||
if (doSound)
|
||||
{
|
||||
new MultiSound.Sound("djSchool/andStop1", beat),
|
||||
new MultiSound.Sound("djSchool/andStop2", beat + .5f, offset: 0.1200f),
|
||||
new MultiSound.Sound("", beat + 1.5f)
|
||||
};
|
||||
var sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound("djSchool/andStop1", beat),
|
||||
new MultiSound.Sound("djSchool/andStop2", beat + .5f, offset: 0.1200f),
|
||||
new MultiSound.Sound("", beat + 1.5f)
|
||||
};
|
||||
|
||||
if (ooh)
|
||||
sound[2] = new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f);
|
||||
if (ooh)
|
||||
sound[2] = new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f);
|
||||
|
||||
MultiSound.Play(sound);
|
||||
MultiSound.Play(sound);
|
||||
}
|
||||
|
||||
|
||||
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
||||
{
|
||||
@ -279,7 +319,7 @@ namespace HeavenStudio.Games
|
||||
ScheduleInput(beat, 1.5f, InputType.STANDARD_DOWN, student.OnHitHold, student.OnMissHold, student.OnEmpty);
|
||||
}
|
||||
|
||||
public void ScratchoHey(float beat, int type)
|
||||
public void ScratchoHey(float beat, int type, bool remix4)
|
||||
{
|
||||
string[] sounds = new string[] { };
|
||||
|
||||
@ -296,23 +336,40 @@ namespace HeavenStudio.Games
|
||||
sounds = new string[] { "djSchool/scratchoHeyLoud1", "djSchool/scratchoHeyLoud2", "djSchool/scratchoHeyLoud3", "djSchool/scratchoHeyLoud4", "djSchool/heyLoud" };
|
||||
}
|
||||
|
||||
float timing = 0f;
|
||||
float beatOffset = 0f;
|
||||
float beatOffset2 = 0f;
|
||||
|
||||
if (!remix4)
|
||||
{
|
||||
timing = 2f;
|
||||
beatOffset = 2f;
|
||||
beatOffset2 = 2.05f;
|
||||
}
|
||||
else
|
||||
{
|
||||
timing = 1.5f;
|
||||
beatOffset = 1.5f;
|
||||
beatOffset2 = 1.55f;
|
||||
}
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + .25f),
|
||||
new MultiSound.Sound(sounds[2], beat + .5f),
|
||||
new MultiSound.Sound(sounds[3], beat + 1f, offset: 0.0500f),
|
||||
new MultiSound.Sound(sounds[4], beat + 2f, offset: 0.070f),
|
||||
new MultiSound.Sound(sounds[4], beat + beatOffset, offset: 0.070f),
|
||||
});
|
||||
|
||||
|
||||
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { djYellow.GetComponent<Animator>().Play("Scratcho", 0, 0); }),
|
||||
new BeatAction.Action(beat + .5f, delegate { djYellow.GetComponent<Animator>().Play("Scratcho2", 0, 0); }),
|
||||
//new BeatAction.Action(beat + 1f, delegate { djYellow.GetComponent<Animator>().Play("Scratcho", 0, 0); SetupCue(beat, true); }),
|
||||
new BeatAction.Action(beat + 1f, delegate { djYellow.GetComponent<Animator>().Play("Scratcho", 0, 0); }),
|
||||
new BeatAction.Action(beat + 2.05f, delegate
|
||||
{
|
||||
new BeatAction.Action(beat + beatOffset2, delegate
|
||||
{
|
||||
djYellow.GetComponent<Animator>().Play("Hey", 0, 0);
|
||||
djYellowHolding = false;
|
||||
}),
|
||||
@ -321,9 +378,12 @@ namespace HeavenStudio.Games
|
||||
|
||||
beatOfInstance = beat;
|
||||
|
||||
|
||||
ScheduleInput(beat, 2f, InputType.STANDARD_UP, student.OnHitSwipe, student.OnMissSwipe, student.OnEmpty);
|
||||
ScheduleInput(beat, timing, InputType.STANDARD_UP, student.OnHitSwipe, student.OnMissSwipe, student.OnEmpty);
|
||||
andStop = false;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//void SetupCue(float beat, bool swipe)
|
||||
@ -434,5 +494,114 @@ namespace HeavenStudio.Games
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region Inactive Game Commands
|
||||
public static void WarnBreakCmon(float beat, int type, bool ooh)
|
||||
{
|
||||
string[] sounds = new string[] { };
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
sounds = new string[] { "djSchool/breakCmon1", "djSchool/breakCmon2", "djSchool/ooh" };
|
||||
break;
|
||||
case 1:
|
||||
sounds = new string[] { "djSchool/breakCmonAlt1", "djSchool/breakCmonAlt2", "djSchool/oohAlt" };
|
||||
break;
|
||||
case 2:
|
||||
sounds = new string[] { "djSchool/breakCmonLoud1", "djSchool/breakCmonLoud2", "djSchool/oohLoud" };
|
||||
break;
|
||||
}
|
||||
|
||||
var sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + 1f, offset: 0.030f),
|
||||
new MultiSound.Sound("", beat + 2f)
|
||||
};
|
||||
|
||||
if (ooh)
|
||||
sound[2] = new MultiSound.Sound(sounds[2], beat + 2f);
|
||||
|
||||
MultiSound.Play(sound, forcePlay: true);
|
||||
wantBreak = beat;
|
||||
}
|
||||
|
||||
public static void WarnAndStop(float beat, bool ooh)
|
||||
{
|
||||
var sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound("djSchool/andStop1", beat),
|
||||
new MultiSound.Sound("djSchool/andStop2", beat + .5f, offset: 0.1200f),
|
||||
new MultiSound.Sound("", beat + 1.5f)
|
||||
};
|
||||
|
||||
if (ooh)
|
||||
sound[2] = new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f);
|
||||
|
||||
|
||||
MultiSound.Play(sound, forcePlay: true);
|
||||
wantAndStop = beat;
|
||||
}
|
||||
|
||||
public static void WarnDJVoiceLines(float beat, int type)
|
||||
{
|
||||
string[] sounds;
|
||||
var sound = new MultiSound.Sound[] { };
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
sounds = new string[] { "djSchool/checkItOut1", "djSchool/checkItOut2", "djSchool/checkItOut3" };
|
||||
sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + .25f),
|
||||
new MultiSound.Sound(sounds[2], beat + .5f),
|
||||
};
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
sounds = new string[] { "djSchool/letsGo1", "djSchool/letsGo2" };
|
||||
sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + .5f),
|
||||
};
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sounds = new string[] { "djSchool/ohYeah1", "djSchool/ohYeah2" };
|
||||
sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + .5f),
|
||||
};
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sounds = new string[] { "djSchool/ohYeahAlt1", "djSchool/ohYeahAlt2", "djSchool/ohYeahAlt3" };
|
||||
sound = new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound(sounds[0], beat),
|
||||
new MultiSound.Sound(sounds[1], beat + .5f),
|
||||
new MultiSound.Sound(sounds[2], beat + 1f),
|
||||
};
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Jukebox.PlayOneShotGame("djSchool/yay");
|
||||
break;
|
||||
}
|
||||
MultiSound.Play(sound, forcePlay: true);
|
||||
wantDJVoiceLines = beat;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user