Skip to content

Commit

Permalink
Selection of various sized arctap
Browse files Browse the repository at this point in the history
  • Loading branch information
yojohanshinwataikei committed Apr 1, 2024
1 parent 0ba7d95 commit 8ecb57e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
12 changes: 8 additions & 4 deletions Assets/Scripts/Gameplay/ArcGameplayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ private void Update()
{
float playBackSpeed = ArcAudioManager.Instance.PlayBackSpeed;
timing += Time.deltaTime * playBackSpeed;
if(EnablePlaybackSync){
if (EnablePlaybackSync)
{
float t = ArcAudioManager.Instance.Timing;
if (deltaDspTime > 0f && (timing >= 0 || ArcAudioManager.Instance.Timing > 0))
{
Expand Down Expand Up @@ -137,11 +138,13 @@ public void ResetJudge()
{
if (Chart != null)
{
foreach (var t in Chart.Arcs) {
foreach (var t in Chart.Arcs)
{
foreach (var a in t.ArcTaps) { a.Judged = false; }
t.Judged = false; t.Judging = false; t.AudioPlayed = false;
if(t.ConvertedVariousSizedArctap!=null){
t.ConvertedVariousSizedArctap.Judged=false;
if (t.ConvertedVariousSizedArctap != null)
{
t.ConvertedVariousSizedArctap.Judged = false;
}
};
foreach (var t in Chart.Holds) { t.Judged = false; t.Judging = false; t.AudioPlayed = false; };
Expand Down Expand Up @@ -194,6 +197,7 @@ public ArcNote FindNoteByRaycastHit(RaycastHit h)
foreach (var arc in Chart.Arcs)
{
if (arc.IsHitMyself(h)) return arc;
if (arc.ConvertedVariousSizedArctap?.IsMyself(h.transform.gameObject) ?? false) return arc;
foreach (var arctap in arc.ArcTaps)
{
if (arctap.IsMyself(h.transform.gameObject)) return arctap;
Expand Down
5 changes: 5 additions & 0 deletions Assets/Scripts/Gameplay/Chart/ArcChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,10 @@ public override bool Selected
set
{
arcRenderer.Selected = value;
if (ConvertedVariousSizedArctap != null)
{
ConvertedVariousSizedArctap.Selected = value;
}
}
}
public override GameObject Instance
Expand Down Expand Up @@ -1257,6 +1261,7 @@ public void InstantiateArcTaps()
IsConvertedVariousSizedArctap = true,
};
ConvertedVariousSizedArctap.Instantiate(this);
ConvertedVariousSizedArctap.Selected=Selected;
}
}
public void DestroyArcTaps()
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Gameplay/Components/ArcArcRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public void BuildHead()
}
public void BuildCollider()
{
if (arc.Timing > arc.EndTiming || segments.Count == 0)
if (arc.Timing > arc.EndTiming || segments.Count == 0 || arc.IsVariousSizedArctap)
{
if (ArcCollider.sharedMesh)
{
Expand Down

0 comments on commit 8ecb57e

Please sign in to comment.