refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -12,16 +12,16 @@ namespace Cryville.Crtr.Event {
readonly Chart chart;
ContainerState rootState;
readonly Dictionary<ChartEvent, ContainerState> containerMap
= new Dictionary<ChartEvent, ContainerState>();
= new();
readonly Dictionary<EventContainer, ContainerState> stateMap
= new Dictionary<EventContainer, ContainerState>();
= new();
readonly Dictionary<ChartEvent, StampedEvent> map
= new Dictionary<ChartEvent, StampedEvent>();
= new();
readonly Dictionary<EventContainer, List<StampedEvent>> coeventMap
= new Dictionary<EventContainer, List<StampedEvent>>();
readonly HashSet<ChartEvent> coevents = new HashSet<ChartEvent>();
readonly List<StampedEvent> stampedEvents = new List<StampedEvent>();
readonly List<EventBatch> batches = new List<EventBatch>();
= new();
readonly HashSet<ChartEvent> coevents = new();
readonly List<StampedEvent> stampedEvents = new();
readonly List<EventBatch> batches = new();
double beat;
float tempo;
@@ -58,8 +58,8 @@ namespace Cryville.Crtr.Event {
}
Events.Add(ev);
containerMap.Add(ev, cs);
if (ev is EventContainer)
AddEventContainer((EventContainer)ev, cs);
if (ev is EventContainer container)
AddEventContainer(container, cs);
}
}
@@ -104,17 +104,16 @@ namespace Cryville.Crtr.Event {
var pev = map[oev];
pev.ReleaseEvent = sev;
sev.Origin = pev;
if (oev is EventContainer) {
if (oev is EventContainer container) {
stampedEvents.Add(new StampedEvent.ClipAhead {
Container = con,
Origin = pev,
Time = etime + ((EventContainer)oev).Clip.Ahead,
Time = etime + container.Clip.Ahead,
});
}
}
if (con != null && coevents.Contains(ev)) {
List<StampedEvent> cevs;
if (!coeventMap.TryGetValue(con, out cevs)) {
if (!coeventMap.TryGetValue(con, out List<StampedEvent> cevs)) {
coeventMap.Add(con, cevs = new List<StampedEvent>());
}
cevs.Add(sev);
@@ -168,9 +167,8 @@ namespace Cryville.Crtr.Event {
}
void BatchCoevents(StampedEvent ev, List<StampedEvent> ocevs = null) {
if (!(ev.Unstamped is EventContainer)) return;
List<StampedEvent> cevs;
if (coeventMap.TryGetValue((EventContainer)ev.Unstamped, out cevs)) {
if (ev.Unstamped is not EventContainer container) return;
if (coeventMap.TryGetValue(container, out List<StampedEvent> cevs)) {
var rootFlag = ocevs == null;
if (rootFlag) ev.Coevents = ocevs = new List<StampedEvent>();
foreach (var cev in cevs) {