mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
47 lines
1 KiB
C#
47 lines
1 KiB
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace HeavenStudio.Games.Scripts_Rockers
|
||
|
{
|
||
|
public class RockerBendInput : MonoBehaviour
|
||
|
{
|
||
|
private int pitch;
|
||
|
|
||
|
private Rockers game;
|
||
|
|
||
|
public void Init(int pitch, float beat, float length)
|
||
|
{
|
||
|
game = Rockers.instance;
|
||
|
this.pitch = pitch;
|
||
|
game.ScheduleInput(beat, length, InputType.DIRECTION_DOWN, Just, Miss, Empty);
|
||
|
}
|
||
|
|
||
|
private void Just(PlayerActionEvent caller, float state)
|
||
|
{
|
||
|
if (state >= 1f || state <= -1f)
|
||
|
{
|
||
|
game.Soshi.BendUp(pitch);
|
||
|
Destroy(gameObject);
|
||
|
return;
|
||
|
}
|
||
|
game.Soshi.BendUp(pitch);
|
||
|
Destroy(gameObject);
|
||
|
}
|
||
|
|
||
|
private void Miss(PlayerActionEvent caller)
|
||
|
{
|
||
|
game.JJ.Miss();
|
||
|
Destroy(gameObject);
|
||
|
}
|
||
|
|
||
|
private void Empty(PlayerActionEvent caller)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|