CNR API Internal Rework (#488)

* Prep stuff

* Tweezers now spawn in

* Started converting tweezers

* I hate <1 beat intervals

* Actually nvm

* fixed a bug

* You can chain intervals now, stack them if you really wanted

* Pass turn checks if crhandlerinstance exists

* Fixed hairs being deleted by onion switch

* Rockers rerewritten

* working dough rerewritten
This commit is contained in:
Rapandrasmus
2023-06-28 06:51:53 +02:00
committed by GitHub
parent f641ac0cee
commit d68e71775a
10 changed files with 531 additions and 523 deletions

View File

@ -7,22 +7,17 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
{
public class Hair : MonoBehaviour
{
public double createBeat;
[NonSerialized] public double createBeat;
public GameObject hairSprite;
public GameObject stubbleSprite;
public GameObject missedSprite;
private RhythmTweezers game;
private Tweezers tweezers;
private bool plucked;
private void Awake()
public void StartInput(double beat, double length, Tweezers tweezer)
{
game = RhythmTweezers.instance;
tweezers = game.Tweezers;
}
public void StartInput(double beat, double length)
{
tweezers = tweezer;
game.ScheduleInput(beat, length, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Just, Miss, Out);
}
@ -30,14 +25,12 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
{
tweezers.Pluck(true, this);
tweezers.hitOnFrame++;
plucked = true;
}
public void NearMiss()
{
tweezers.Pluck(false, this);
tweezers.hitOnFrame++;
plucked = true;
}
private void Just(PlayerActionEvent caller, float state)