mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:07:38 +02:00
Glee Club REAL! (#346)
* Got some basics down * Started on the event stuff * Stop wail added * Baton cue added * quick anim fixes * Started on hearts and miss faces * Did anim stuff * anim fixes * Together Now! * Glee Club - Together Now & Anim Fixes * Forcesing added * Street Spirit (Fade Out) * Pitching Slider for conductor voice * Small tweaks to glee club * Repeating tickbox added to glee club sing event * Toggle chorus kid presence added --------- Co-authored-by: ev <85412919+evdial@users.noreply.github.com> Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: minenice55 <star.elementa@gmail.com>
This commit is contained in:
69
Assets/Scripts/Games/GleeClub/GleeClubSingInput.cs
Normal file
69
Assets/Scripts/Games/GleeClub/GleeClubSingInput.cs
Normal file
@ -0,0 +1,69 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using HeavenStudio.Util;
|
||||
|
||||
namespace HeavenStudio.Games.Scripts_GleeClub
|
||||
{
|
||||
public class GleeClubSingInput : PlayerActionObject
|
||||
{
|
||||
public float pitch = 1f;
|
||||
bool shouldClose = true;
|
||||
bool shouldOpen = true;
|
||||
|
||||
private GleeClub game;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
game = GleeClub.instance;
|
||||
}
|
||||
|
||||
public void Init(float beat, float length, int close)
|
||||
{
|
||||
shouldClose = close != (int)GleeClub.MouthOpenClose.OnlyOpen;
|
||||
shouldOpen = close != (int)GleeClub.MouthOpenClose.OnlyClose;
|
||||
if (shouldOpen) game.ScheduleInput(beat - 1, 1, InputType.STANDARD_UP, Just, Miss, Out);
|
||||
if (shouldClose) game.ScheduleInput(beat, length, InputType.STANDARD_DOWN, JustClose, MissClose, Out);
|
||||
}
|
||||
|
||||
public void Just(PlayerActionEvent caller, float state)
|
||||
{
|
||||
if (!game.playerChorusKid.singing)
|
||||
{
|
||||
game.playerChorusKid.currentPitch = pitch;
|
||||
game.playerChorusKid.StartSinging();
|
||||
}
|
||||
if (!shouldClose) CleanUp();
|
||||
}
|
||||
|
||||
public void JustClose(PlayerActionEvent caller, float state)
|
||||
{
|
||||
game.playerChorusKid.StopSinging();
|
||||
CleanUp();
|
||||
}
|
||||
|
||||
public void MissClose(PlayerActionEvent caller)
|
||||
{
|
||||
game.missed = true;
|
||||
CleanUp();
|
||||
}
|
||||
|
||||
public void Miss(PlayerActionEvent caller)
|
||||
{
|
||||
game.missed = true;
|
||||
if (!shouldClose) CleanUp();
|
||||
}
|
||||
|
||||
public void Out(PlayerActionEvent caller)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CleanUp()
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user