Merge pull request #24 from jakobwcrowe/megaminerzero

Rhythm Tweezers: Smol tweaks
This commit is contained in:
Braedon 2022-02-09 01:56:35 -05:00 committed by GitHub
commit 07ebe1e318
7 changed files with 1734 additions and 6 deletions

View file

@ -907,7 +907,7 @@ MonoBehaviour:
EligibleHits: []
firstEnable: 0
Vegetable: {fileID: 3177931334588542204}
Tweezers: {fileID: 3684904985109994079}
Tweezers: {fileID: 3391455012319192365}
HairsHolder: {fileID: 2002856028339003249}
tweezersBeatOffset: 2
tweezersRotOffset: {x: -202, y: 180}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1dc707b21eafedc489755a207716f5f6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -26,6 +26,32 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-2331805597223418774
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 1dc707b21eafedc489755a207716f5f6, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &-2216339865779360219
AnimatorStateMachine:
serializedVersion: 6
@ -37,13 +63,16 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 4916924286820753218}
m_Position: {x: 200, y: 0, z: 0}
m_Position: {x: 330, y: 80, z: 0}
- serializedVersion: 1
m_State: {fileID: 1579657111189297045}
m_Position: {x: 360, y: 153.5, z: 0}
- serializedVersion: 1
m_State: {fileID: -8842574261698634582}
m_Position: {x: 395, y: 218.5, z: 0}
- serializedVersion: 1
m_State: {fileID: -2331805597223418774}
m_Position: {x: 280, y: 0, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@ -53,7 +82,7 @@ AnimatorStateMachine:
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 4916924286820753218}
m_DefaultState: {fileID: -2331805597223418774}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
@ -128,3 +157,29 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &7916315183671629062
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle 0
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View file

@ -7,13 +7,19 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
public class Hair : PlayerActionObject
{
public float createBeat;
private Tweezers tweezers;
private void Awake()
{
tweezers = RhythmTweezers.instance.Tweezers;
}
private void Update()
{
float stateBeat = Conductor.instance.GetPositionFromBeat(createBeat, 4f);
StateCheck(stateBeat);
if (PlayerInput.Pressed() && RhythmTweezers.instance.Tweezers.GetComponent<Tweezers>().hitOnFrame == 0)
if (PlayerInput.Pressed() && tweezers.hitOnFrame == 0)
{
if (state.perfect)
{
@ -24,7 +30,6 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
public void Ace()
{
Tweezers tweezers = RhythmTweezers.instance.Tweezers.GetComponent<Tweezers>();
tweezers.Pluck(true, this);
tweezers.hitOnFrame++;

View file

@ -10,7 +10,8 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
public class RhythmTweezers : Minigame
{
public GameObject Vegetable;
public GameObject Tweezers;
public Animator VegetableAnimator;
public Tweezers Tweezers;
[SerializeField] private GameObject HairsHolder;

View file

@ -10,10 +10,12 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
{
public int hitOnFrame;
private Animator anim;
private Animator vegetableAnim;
private void Start()
{
anim = GetComponent<Animator>();
vegetableAnim = RhythmTweezers.instance.VegetableAnimator;
}
private void LateUpdate()