Skip to content

Commit

Permalink
Fixed small tap note issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteAsian123 committed Apr 21, 2023
1 parent 768ae85 commit 0977fcf
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 44 deletions.
44 changes: 44 additions & 0 deletions Assets/Art/Fonts/FontSprites.asset
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@ MonoBehaviour:
m_Scale: 1.3
m_Name: harmVocals
m_HashCode: 240351634
- m_ElementType: 2
m_Unicode: 65534
m_GlyphIndex: 15
m_Scale: 1.3
m_Name: rhythm
m_HashCode: 216518066
- m_ElementType: 2
m_Unicode: 65534
m_GlyphIndex: 16
m_Scale: 1.3
m_Name: guitar_coop
m_HashCode: -1086307536
m_SpriteGlyphTable:
- m_Index: 0
m_Metrics:
Expand Down Expand Up @@ -385,5 +397,37 @@ MonoBehaviour:
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 1676829369, guid: 66fae0a679753ea4a9110a183b8d2af9, type: 3}
- m_Index: 15
m_Metrics:
m_Width: 256
m_Height: 256
m_HorizontalBearingX: 0
m_HorizontalBearingY: 198
m_HorizontalAdvance: 256
m_GlyphRect:
m_X: 0
m_Y: 0
m_Width: 256
m_Height: 256
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -413506960, guid: 66fae0a679753ea4a9110a183b8d2af9, type: 3}
- m_Index: 16
m_Metrics:
m_Width: 256
m_Height: 256
m_HorizontalBearingX: 0
m_HorizontalBearingY: 198
m_HorizontalAdvance: 256
m_GlyphRect:
m_X: 768
m_Y: 256
m_Width: 256
m_Height: 256
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 1095511443, guid: 66fae0a679753ea4a9110a183b8d2af9, type: 3}
spriteInfoList: []
fallbackSpriteAssets: []
2 changes: 1 addition & 1 deletion Assets/Art/Meshes/Notes_Tap.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ MeshRenderer:
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: ab191d4162f80b741b282594e23f14ca, type: 2}
- {fileID: 2100000, guid: 0e410b84cdc264544a6ba5b805c80fb3, type: 2}
- {fileID: 2100000, guid: 8427df3402388ca4e80f4411ae8ee82e, type: 2}
- {fileID: 2100000, guid: 0e410b84cdc264544a6ba5b805c80fb3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
Expand Down
37 changes: 35 additions & 2 deletions Assets/Prefabs/DrumsNote.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Transform:
m_Children:
- {fileID: 3676109393068581280}
- {fileID: 7677582505515718665}
- {fileID: 173717695566584398}
- {fileID: 7437171449997926572}
- {fileID: 3083436502393406622}
m_Father: {fileID: 0}
Expand All @@ -57,6 +58,7 @@ MonoBehaviour:
meshRendererMiddleIndices: 020000000000000001000000
noteGroup: {fileID: 1397812567785855241}
hopoGroup: {fileID: 5887489561296935717}
tapGroup: {fileID: 6027034360231535167}
fullGroup: {fileID: 4634473573192609450}
fretNumber: {fileID: 0}
lineRenderer: {fileID: 5864461325193466425}
Expand Down Expand Up @@ -122,7 +124,7 @@ Transform:
m_Children:
- {fileID: 5342919547348619199}
m_Father: {fileID: 861361446070616035}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5887489561296935717
GameObject:
Expand Down Expand Up @@ -156,6 +158,37 @@ Transform:
m_Father: {fileID: 861361446070616035}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 18.49, y: 0, z: 0}
--- !u!1 &6027034360231535167
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 173717695566584398}
m_Layer: 6
m_Name: TapGroupDummy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &173717695566584398
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6027034360231535167}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 861361446070616035}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7189655996071686276
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -186,7 +219,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 861361446070616035}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!120 &5864461325193466425
LineRenderer:
Expand Down
8 changes: 4 additions & 4 deletions Assets/Prefabs/Note.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ MonoBehaviour:
- {fileID: 6846950644507852135}
- {fileID: 6376229487116774476}
- {fileID: 7147253800328892818}
meshRendererMiddleIndices: 02000000010000000200000001000000
meshRendererMiddleIndices: 02000000010000000100000001000000
noteGroup: {fileID: 1397812567785855241}
hopoGroup: {fileID: 1294466957868725440}
tapGroup: {fileID: 3624981743589644049}
Expand All @@ -78,7 +78,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &2485029377005370073
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -142,7 +142,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &2078363896503798061
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -174,7 +174,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &7437171449997926572
Transform:
m_ObjectHideFlags: 0
Expand Down
40 changes: 36 additions & 4 deletions Assets/Prefabs/RealGuitarNote.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 861361446070616035}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 68.559, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
Expand Down Expand Up @@ -203,6 +203,7 @@ Transform:
m_Children:
- {fileID: 3676109393068581280}
- {fileID: 2485029377005370073}
- {fileID: 7774362077026621734}
- {fileID: 969241233629970397}
- {fileID: 3083436502393406622}
- {fileID: 6247713159172371674}
Expand All @@ -229,7 +230,7 @@ MonoBehaviour:
meshRendererMiddleIndices: 0200000002000000
noteGroup: {fileID: 1397812567785855241}
hopoGroup: {fileID: 1294466957868725440}
tapGroup: {fileID: 0}
tapGroup: {fileID: 8745650086612154010}
fullGroup: {fileID: 5879953073027725293}
fretNumber: {fileID: 5134052872940096443}
lineRenderer: {fileID: 5864461325193466425}
Expand Down Expand Up @@ -326,7 +327,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 861361446070616035}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7189655996071686276
GameObject:
Expand Down Expand Up @@ -358,7 +359,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 861361446070616035}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!120 &5864461325193466425
LineRenderer:
Expand Down Expand Up @@ -459,6 +460,37 @@ LineRenderer:
generateLightingData: 0
m_UseWorldSpace: 0
m_Loop: 0
--- !u!1 &8745650086612154010
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7774362077026621734}
m_Layer: 6
m_Name: TapGroupDummy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &7774362077026621734
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745650086612154010}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 861361446070616035}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &3999898006346069272
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/MenuScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2608,7 +2608,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -13.5000305}
m_AnchoredPosition: {x: 0, y: -13.500061}
m_SizeDelta: {x: -6, y: -33}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &226426086
Expand Down
2 changes: 1 addition & 1 deletion Assets/Script/Data/NoteInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class NoteInfo : AbstractInfo {
/// </summary>
public bool hopo;
/// <summary>
/// Tap note. Only used for guitar, coop guitar, rhythm, and bass.
/// Tap note. Only used for five fret.
/// </summary>
public bool tap;
/// <summary>
Expand Down
9 changes: 3 additions & 6 deletions Assets/Script/PlayMode/FiveFretTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class FiveFretTrack : AbstractTrack {
private List<NoteInfo> heldNotes = new();
private float? latestInput = null;
private bool latestInputIsStrum = false;
private bool[] extendedSustain = new bool[] {false,false,false,false,false};
private bool[] extendedSustain = new bool[] { false, false, false, false, false };

private int notesHit = 0;
// private int notesMissed = 0;
Expand Down Expand Up @@ -343,7 +343,7 @@ private void UpdateInput() {
// add it to the allowed overstrums. This is so the player
// doesn't lose their combo when they strum AFTER they hit
// the tap note.
if ((chord[0].hopo||chord[0].tap) && !strummedCurrentNote) {
if ((chord[0].hopo || chord[0].tap) && !strummedCurrentNote) {
allowedOverstrums.Clear(); // Only allow overstrumming latest HO/PO
allowedOverstrums.Add(chord);
} else if (allowedOverstrums.Count > 0 && !chord[0].hopo && !chord[0].tap) {
Expand All @@ -358,7 +358,6 @@ private void UpdateInput() {
}
}
}

}
}

Expand Down Expand Up @@ -572,11 +571,10 @@ private void SpawnNote(NoteInfo noteInfo, float time) {
model = NoteComponent.ModelType.FULL;
} else if (noteInfo.hopo) {
model = NoteComponent.ModelType.HOPO;
} else if (noteInfo.tap){
} else if (noteInfo.tap) {
model = NoteComponent.ModelType.TAP;
}


// Set note info
var noteComp = notePool.AddNote(noteInfo, pos);
startFCDetection = true;
Expand All @@ -586,7 +584,6 @@ private void SpawnNote(NoteInfo noteInfo, float time) {
noteInfo.length,
model
);

}

private string PrintFrets() { // Debug function; remove later?
Expand Down
Loading

0 comments on commit 0977fcf

Please sign in to comment.