tunnel now actually functions as a rhythm game
This commit is contained in:
parent
b8d5f908ef
commit
52b74c892f
|
@ -49,31 +49,6 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1101 &-972722190704787373
|
|
||||||
AnimatorStateTransition:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name:
|
|
||||||
m_Conditions:
|
|
||||||
- m_ConditionMode: 1
|
|
||||||
m_ConditionEvent: bellhit
|
|
||||||
m_EventTreshold: 0
|
|
||||||
m_DstStateMachine: {fileID: 0}
|
|
||||||
m_DstState: {fileID: -5541921550588990438}
|
|
||||||
m_Solo: 0
|
|
||||||
m_Mute: 0
|
|
||||||
m_IsExit: 0
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransitionDuration: 0
|
|
||||||
m_TransitionOffset: 0
|
|
||||||
m_ExitTime: 0.75
|
|
||||||
m_HasExitTime: 0
|
|
||||||
m_HasFixedDuration: 1
|
|
||||||
m_InterruptionSource: 0
|
|
||||||
m_OrderedInterruption: 1
|
|
||||||
m_CanTransitionToSelf: 1
|
|
||||||
--- !u!1107 &-278945667835189233
|
--- !u!1107 &-278945667835189233
|
||||||
AnimatorStateMachine:
|
AnimatorStateMachine:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
@ -90,8 +65,7 @@ AnimatorStateMachine:
|
||||||
m_State: {fileID: -5541921550588990438}
|
m_State: {fileID: -5541921550588990438}
|
||||||
m_Position: {x: 520, y: 20, z: 0}
|
m_Position: {x: 520, y: 20, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions:
|
m_AnyStateTransitions: []
|
||||||
- {fileID: -972722190704787373}
|
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
m_StateMachineTransitions: {}
|
m_StateMachineTransitions: {}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
new GameAction("Start", delegate { Tunnel.instance.StartCowbell(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle); }, 1, false, parameters: new List<Param>()
|
new GameAction("Cowbell", delegate { Tunnel.instance.StartCowbell(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle, eventCaller.currentEntity.length); }, 1f, true, parameters: new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", false, "Driver can stop", "Lets the driver stop if the player makes too many mistakes"),
|
new Param("toggle", false, "Driver can stop", "Lets the driver stop if the player makes too many mistakes"),
|
||||||
}),
|
}),
|
||||||
|
@ -75,6 +75,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public float handStart;
|
public float handStart;
|
||||||
public float handProgress;
|
public float handProgress;
|
||||||
|
public bool started;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
@ -93,10 +94,10 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (PlayerInput.Pressed()) //&& !IsExpectingInputNow())
|
if (PlayerInput.Pressed() && !IsExpectingInputNow())
|
||||||
{
|
{
|
||||||
HitCowbell();
|
HitCowbell();
|
||||||
|
print("unexpected input");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,8 +124,16 @@ namespace HeavenStudio.Games
|
||||||
cowbellAnimator.Play("Shake",-1,0);
|
cowbellAnimator.Play("Shake",-1,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartCowbell(float beat, bool audienceReacting)
|
public void StartCowbell(float beat, bool audienceReacting, float length)
|
||||||
{
|
{
|
||||||
|
started = true;
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 1; i <= length; i++)
|
||||||
|
{
|
||||||
|
ScheduleInput(beat, i, InputType.STANDARD_DOWN, CowbellSuccess, CowbellMiss, CowbellEmpty);
|
||||||
|
}
|
||||||
|
|
||||||
//if (coin != null) return;
|
//if (coin != null) return;
|
||||||
|
|
||||||
//Play sound and animations
|
//Play sound and animations
|
||||||
|
@ -159,5 +168,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue