This commit is contained in:
SoulliesOfficial
2026-01-21 00:31:23 -05:00
parent 66a1701087
commit 4fe6ee5f99
70 changed files with 1595 additions and 687 deletions

View File

@@ -48,6 +48,11 @@ namespace Ichni.RhythmGame
}
}
private void LateUpdate()
{
if(trackPathSubmodule != null) trackPathSubmodule.refreshedThisFrame = false;
}
public override void AfterInitialize()
{
base.AfterInitialize();
@@ -56,6 +61,18 @@ namespace Ichni.RhythmGame
{
trackPathSubmodule.ClosePath();
}
if(trackRendererSubmodule != null)
{
//var path = trackPathSubmodule!.path;
trackRendererSubmodule.meshGenerator.autoUpdate = false;
/*path.ResampleTransform();
path.Subscribe(trackRendererSubmodule.meshGenerator);
path.EditorUpdateConnectedNodes();
path.RebuildImmediate(true, true);*/
//path.EditorAwake();
}
}

View File

@@ -17,6 +17,8 @@ namespace Ichni.RhythmGame
public Track.TrackSamplingType trackSamplingType;
public bool isClosed;
public bool refreshedThisFrame = false;
public bool isShowingDisplay;
public TrackPathSubmodule(Track track, Track.TrackSpaceType trackSpaceType,
@@ -79,16 +81,17 @@ namespace Ichni.RhythmGame
public override void Refresh()
{
if(refreshedThisFrame) return;
refreshedThisFrame = true;
SetTrackSpaceType((int)trackSpaceType);
SetUpSplineComputer(trackSpaceType, trackSamplingType);
foreach (var pathNode in pathNodeList)
{
SetPathNode(pathNode);
}
ClosePath();
path.Rebuild(true);
path.RebuildImmediate(true, true);
}
}

View File

@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Dreamteck.Splines;
using Ichni.RhythmGame.Beatmap;
using UniRx;
using Unity.VisualScripting;
using UnityEngine;
using Object = UnityEngine.Object;

View File

@@ -39,84 +39,6 @@ namespace Ichni
List<InputUnitSwipe> tapSwipeList = inputUnitSwipeList.Where(x => x.isFirst).ToList();
List<InputUnitSwipe> holdSwipeList = inputUnitSwipeList.Where(x => !x.isFirst).ToList();
foreach (InputUnitTap inputUnitTap in inputUnitTapList)
{
List<Tap> availableTaps = new List<Tap>();
foreach (Tap tap in checkingTapList)
{
if (tap.CheckJudgeAvailability(inputUnitTap))
{
availableTaps.Add(tap);
}
}
List<Hold> availableHolds = new List<Hold>();
foreach (Hold hold in checkingHoldList)
{
if (hold.CheckJudgeAvailability(inputUnitTap))
{
availableHolds.Add(hold);
}
}
bool haveTap = availableTaps.Count > 0;
bool haveHold = availableHolds.Count > 0;
if (haveHold && haveTap)
{
List<Hold> minHolds = GetAllMinNotes(availableHolds);
List<Tap> minTaps = GetAllMinNotes(availableTaps);
Hold closestHold = minHolds[0];
Tap closestTap = minTaps[0];
if (closestHold.exactJudgeTime < closestTap.exactJudgeTime)
{
if (minHolds.Count == 1)
{
minHolds[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minHolds, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
else
{
if (minTaps.Count == 1)
{
minTaps[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minTaps, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
}
else if (haveHold)
{
List<Hold> minHolds = GetAllMinNotes(availableHolds);
if (minHolds.Count == 1)
{
minHolds[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minHolds, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
else if (haveTap)
{
List<Tap> minTaps = GetAllMinNotes(availableTaps);
if (minTaps.Count == 1)
{
minTaps[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minTaps, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
}
foreach (InputUnitSwipe tapSwipe in tapSwipeList)
{
List<Flick> availableFlicks = new List<Flick>();
@@ -161,6 +83,121 @@ namespace Ichni
}
}
foreach (InputUnitTap inputUnitTap in inputUnitTapList)
{
List<Tap> availableTaps = new List<Tap>();
foreach (Tap tap in checkingTapList)
{
if (tap.CheckJudgeAvailability(inputUnitTap))
{
availableTaps.Add(tap);
}
}
List<Hold> availableHolds = new List<Hold>();
foreach (Hold hold in checkingHoldList)
{
if (hold.CheckJudgeAvailability(inputUnitTap))
{
availableHolds.Add(hold);
}
}
bool haveTap = availableTaps.Count > 0;
bool haveHold = availableHolds.Count > 0;
Flick closestFlick = null;
InputUnitSwipe assumedSwipe = new InputUnitSwipe(inputUnitTap.fingerId, inputUnitTap.inputPosition, true, true, Vector2.zero);
foreach (Flick flick in checkingFlickList)
{
if (flick.CheckJudgeAvailability(assumedSwipe))
{
if (closestFlick == null || flick.exactJudgeTime < closestFlick.exactJudgeTime)
{
closestFlick = flick;
}
}
}
if (haveHold && haveTap)
{
List<Hold> minHolds = GetAllMinNotes(availableHolds);
List<Tap> minTaps = GetAllMinNotes(availableTaps);
Hold closestHold = minHolds[0];
Tap closestTap = minTaps[0];
bool holdBlockedByFlick = false;
bool tapBlockedByFlick = false;
if (closestFlick != null)
{
if (closestFlick.exactJudgeTime < closestHold.exactJudgeTime)
{
holdBlockedByFlick = true;
}
if (closestFlick.exactJudgeTime < closestTap.exactJudgeTime)
{
tapBlockedByFlick = true;
}
}
if (!holdBlockedByFlick && closestHold.exactJudgeTime < closestTap.exactJudgeTime)
{
if (minHolds.Count == 1)
{
minHolds[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minHolds, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
else if (!tapBlockedByFlick)
{
if (minTaps.Count == 1)
{
minTaps[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minTaps, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
}
else if (haveHold)
{
List<Hold> minHolds = GetAllMinNotes(availableHolds);
bool holdBlockedByFlick = closestFlick != null && closestFlick.exactJudgeTime < minHolds[0].exactJudgeTime;
if (!holdBlockedByFlick)
{
if (minHolds.Count == 1)
{
minHolds[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minHolds, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
}
else if (haveTap)
{
List<Tap> minTaps = GetAllMinNotes(availableTaps);
bool tapBlockedByFlick = closestFlick != null && closestFlick.exactJudgeTime < minTaps[0].exactJudgeTime;
if (!tapBlockedByFlick)
{
if (minTaps.Count == 1)
{
minTaps[0].ExecuteStartJudge();
}
else
{
GetNearestNote(minTaps, inputUnitTap.inputPosition).ExecuteStartJudge();
}
}
}
}
foreach (InputUnitTouch inputUnitTouch in inputUnitTouchList)
{
List<Stay> availableStays = new List<Stay>();