This commit is contained in:
2023-01-09 22:17:42 +08:00
parent 4e851d9b73
commit ea9000f2b0
6 changed files with 6 additions and 436 deletions

View File

@@ -130,15 +130,6 @@ namespace Cryville.Crtr {
get { return Duration > 0; }
}
private InstantEvent attev = null;
[JsonIgnore]
public InstantEvent AttackEvent {
get {
if (attev == null) attev = new InstantEvent(this);
return attev;
}
}
private InstantEvent relev = null;
[JsonIgnore]
public InstantEvent ReleaseEvent {

View File

@@ -333,7 +333,7 @@ namespace Cryville.Crtr.Event {
ccs.Working = true;
ccs.StartUpdate();
UpdateMotions();
if (!ev.Unstamped.IsLong) {
if (!cev.IsLong) {
ccs.Working = false;
ccs.BroadcastEndUpdate();
if (CloneType == 1) ccs.Dispose();

View File

@@ -154,12 +154,11 @@ namespace Cryville.Crtr.Event {
int CompareStampedEvents(StampedEvent a, StampedEvent b) {
int u = a.CompareTo(b);
if (u != 0) return u;
if (a.Unstamped != null && b.Unstamped != null)
if (containerMap.ContainsKey(a.Unstamped) && containerMap.ContainsKey(b.Unstamped)) {
u = containerMap[a.Unstamped].Depth.CompareTo(containerMap[b.Unstamped].Depth);
if (u != 0) return u;
}
return a.GetHashCode().CompareTo(b.GetHashCode());
if (a.Unstamped != null && b.Unstamped != null && containerMap.ContainsKey(a.Unstamped) && containerMap.ContainsKey(b.Unstamped)) {
u = containerMap[a.Unstamped].Depth.CompareTo(containerMap[b.Unstamped].Depth);
if (u != 0) return u;
}
return 0;
}
}
}

View File

@@ -35,13 +35,6 @@ namespace Cryville.Crtr {
}
}
public StampedEvent AttackEvent {
get {
if (attev == null) attev = Subevents.FirstOrDefault(ev => ev.Time == this.Time);
return attev;
}
}
public StampedEvent ReleaseEvent {
get {
if (relev == null) relev = Subevents.FirstOrDefault(ev => ((InstantEvent)ev.Unstamped).IsRelease);