This commit is contained in:
AstrlJelly 2023-07-07 12:21:18 -04:00
parent 80a0fded97
commit ad4a5b607f
2 changed files with 20 additions and 30 deletions

View file

@ -213,12 +213,11 @@ namespace HeavenStudio.Games
public void Clap(float beat, float length, int type, bool spotlightToggle)
{
MultiSound.Play(new MultiSound.Sound[] {
new MultiSound.Sound("clapTrap/donk", beat),
new MultiSound.Sound("clapTrap/donk", beat + length),
new MultiSound.Sound("clapTrap/donk", beat + length * 2),
new MultiSound.Sound("clapTrap/whiff", beat + length * 4, offset : (float)(Jukebox.GetClipLengthGame("clapTrap/whiff"))),
new MultiSound.Sound("clapTrap/donk", beat),
new MultiSound.Sound("clapTrap/donk", beat + length),
new MultiSound.Sound("clapTrap/donk", beat + length * 2),
new MultiSound.Sound("clapTrap/whiff", beat + length * 4.5),
}, forcePlay: true);
if (spotlightToggle)
@ -242,13 +241,8 @@ namespace HeavenStudio.Games
swordClone.cueLength = length * 4;
swordClone.cueStart = beat;
swordClone.cueType = type;
}
public void DollAnimations(float beat, int animate)
{
if (animate == 0)
@ -269,20 +263,15 @@ namespace HeavenStudio.Games
{
dollHead.DoScaledAnimationAsync("HeadTalk", 0.5f);
}
}
public void ChangeBackgroundColor(Color color, float beats)
{
var seconds = Conductor.instance.secPerBeat * beats;
{
if (bgColorTween != null)
bgColorTween.Kill(true);
}
if (bgColorTween != null)
bgColorTween.Kill(true);
if (seconds == 0)
{
bg.color = color;
@ -292,9 +281,7 @@ namespace HeavenStudio.Games
bgColorTween = bg.DOColor(color, seconds);
}
backgroundColor = color;
backgroundColor = color;
}
public void FadeBackgroundColor(Color start, Color end, float beats)
@ -319,7 +306,5 @@ namespace HeavenStudio.Games
spotlightMaterial.SetColor("_ColorBravo", glowSpotlightColor);
spotlightMaterial.SetColor("_ColorDelta", bottomSpotlightColor);
}
}
}

View file

@ -8,16 +8,23 @@ namespace HeavenStudio.Games.Scripts_ClapTrap
{
public class Sword : MonoBehaviour
{
public double cueStart;
public double cueLength;
public float cueLength;
public int cueType;
private Animator dollHead;
private Animator dollArms;
private ClapTrap game;
// Start is called before the first frame update
void Awake()
{
ClapTrap.instance.ScheduleInput(cueStart, cueLength, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Hit, Miss, Out);
game = ClapTrap.instance;
dollHead = game.dollHead;
dollArms = game.dollArms;
game.ScheduleInput((float)cueStart, cueLength, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Hit, Miss, Out);
}
// Update is called once per frame
@ -50,11 +57,9 @@ namespace HeavenStudio.Games.Scripts_ClapTrap
}
dollArms.DoScaledAnimationAsync("ArmsHit", 0.5f);
clapEffect.DoScaledAnimationAsync("ClapEffect", 0.5f);
game.clapEffect.DoScaledAnimationAsync("ClapEffect", 0.5f);
swordClone.SetActive(true);
swordClone.GetComponent<Animator>().DoScaledAnimationAsync("swordHandHit", 0.5f);
GetComponent<Animator>().DoScaledAnimationAsync("swordHandHit", 0.5f);
}
private void Miss(PlayerActionEvent caller)