HeavenStudioPlus/Assets/Scripts/Games/RhythmTweezers/Hair.cs

59 lines
1.5 KiB
C#
Raw Normal View History

2022-02-09 03:58:25 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
2022-02-09 03:58:25 +00:00
2022-03-14 14:21:05 +00:00
namespace HeavenStudio.Games.Scripts_RhythmTweezers
2022-02-09 03:58:25 +00:00
{
public class Hair : MonoBehaviour
2022-02-09 03:58:25 +00:00
{
public float createBeat;
public GameObject hairSprite;
public GameObject stubbleSprite;
public GameObject missedSprite;
private RhythmTweezers game;
2022-02-09 06:52:50 +00:00
private Tweezers tweezers;
private bool plucked;
2022-02-09 06:52:50 +00:00
private void Awake()
{
game = RhythmTweezers.instance;
tweezers = game.Tweezers;
2022-02-09 06:52:50 +00:00
}
2022-02-09 03:58:25 +00:00
Rockers + Rhythm Tweezers Call and Response API (#444) * rock hers * Rockers is a real game and also color maps have been added * little more set up * anims and mor sprites * First version of CallAndResponseHandler added * You can mute now wow * Got some stuff working * anim city * Fixed Inputs * Visual goodies * Changed how some events work * Rockers is now stack proof * Fixed a bug * Bend early stages * bendbendbendbendbendover * bend fully implemented * Removed "noise" * pain * Many animation * Bend anims implemented * strum effect implemented * Made bends work way better * dfgdfsgsdffsd * Implemented strumstart and countin * hi * Made strumstart transition into strumidle * Implemented samples * All of the btsds samples are in now too * many anim2 * A buggy version of the custom together system has been implemented * Ok now it's unbuggified * fixed a small thing * lightning eff * anim fixes * oops * you can now mute voiceline and also put in a standalone voiceline block * Tweaks to dropdowns * more tiny anim thing * more animation stuff * Bug fixes * implemented mute and gotomiddle sliders for custom together event * Default cmon and last one added * You can chain last ones and cmons now * Applause sounds added * Fixed some bugs * Made it so you can disable camera movement * fixed an inconsistency * Rhythm tweezers is actually kinda playable now, not finished though, i need to make beat offset work with this * Rhythm tweezers now works between game switches * Beat offset eradication * Made eye size work properly * Camera quad ease rather than quint * Inactive intervals added * Rockers works inactively too now * Bug fix * No peeking! No way! * Alt smile added for tweezers * early and late riff * jj miss anim * icon and miss * Long hair works properly now * Miss anims implemented for rockers --------- Co-authored-by: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Co-authored-by: minenice55 <star.elementa@gmail.com>
2023-05-29 20:09:34 +00:00
public void StartInput(float beat, float length)
2022-02-09 03:58:25 +00:00
{
Rockers + Rhythm Tweezers Call and Response API (#444) * rock hers * Rockers is a real game and also color maps have been added * little more set up * anims and mor sprites * First version of CallAndResponseHandler added * You can mute now wow * Got some stuff working * anim city * Fixed Inputs * Visual goodies * Changed how some events work * Rockers is now stack proof * Fixed a bug * Bend early stages * bendbendbendbendbendover * bend fully implemented * Removed "noise" * pain * Many animation * Bend anims implemented * strum effect implemented * Made bends work way better * dfgdfsgsdffsd * Implemented strumstart and countin * hi * Made strumstart transition into strumidle * Implemented samples * All of the btsds samples are in now too * many anim2 * A buggy version of the custom together system has been implemented * Ok now it's unbuggified * fixed a small thing * lightning eff * anim fixes * oops * you can now mute voiceline and also put in a standalone voiceline block * Tweaks to dropdowns * more tiny anim thing * more animation stuff * Bug fixes * implemented mute and gotomiddle sliders for custom together event * Default cmon and last one added * You can chain last ones and cmons now * Applause sounds added * Fixed some bugs * Made it so you can disable camera movement * fixed an inconsistency * Rhythm tweezers is actually kinda playable now, not finished though, i need to make beat offset work with this * Rhythm tweezers now works between game switches * Beat offset eradication * Made eye size work properly * Camera quad ease rather than quint * Inactive intervals added * Rockers works inactively too now * Bug fix * No peeking! No way! * Alt smile added for tweezers * early and late riff * jj miss anim * icon and miss * Long hair works properly now * Miss anims implemented for rockers --------- Co-authored-by: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Co-authored-by: minenice55 <star.elementa@gmail.com>
2023-05-29 20:09:34 +00:00
game.ScheduleInput(beat, length, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Just, Miss, Out);
2022-02-09 03:58:25 +00:00
}
public void Ace()
{
tweezers.Pluck(true, this);
tweezers.hitOnFrame++;
plucked = true;
}
2022-02-09 03:58:25 +00:00
public void NearMiss()
{
tweezers.Pluck(false, this);
2022-02-09 03:58:25 +00:00
tweezers.hitOnFrame++;
plucked = true;
}
private void Just(PlayerActionEvent caller, float state)
{
if (state >= 1f || state <= -1f) {
NearMiss();
return;
}
Ace();
2022-02-09 03:58:25 +00:00
}
private void Miss(PlayerActionEvent caller)
{
// this is where perfect challenge breaks
}
private void Out(PlayerActionEvent caller) {}
2022-02-09 03:58:25 +00:00
}
}