Refactor ReleaseEvent.
This commit is contained in:
@@ -130,11 +130,11 @@ namespace Cryville.Crtr {
|
||||
get { return Duration > 0; }
|
||||
}
|
||||
|
||||
private InstantEvent relev = null;
|
||||
private ReleaseEvent relev = null;
|
||||
[JsonIgnore]
|
||||
public InstantEvent ReleaseEvent {
|
||||
public ReleaseEvent ReleaseEvent {
|
||||
get {
|
||||
if (relev == null) relev = new InstantEvent(this, true);
|
||||
if (relev == null) relev = new ReleaseEvent(this);
|
||||
return relev;
|
||||
}
|
||||
}
|
||||
@@ -161,18 +161,12 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
}
|
||||
|
||||
public class InstantEvent : ChartEvent {
|
||||
public class ReleaseEvent : ChartEvent {
|
||||
public readonly ChartEvent Original;
|
||||
public bool IsRelease;
|
||||
|
||||
public InstantEvent(ChartEvent orig, bool release = false) {
|
||||
IsRelease = release;
|
||||
if (orig != null) {
|
||||
Original = orig;
|
||||
time = orig.time;
|
||||
if (IsRelease)
|
||||
BeatOffset = orig.Duration;
|
||||
}
|
||||
public ReleaseEvent(ChartEvent orig) {
|
||||
Original = orig;
|
||||
time = orig.endtime;
|
||||
}
|
||||
|
||||
public override int Priority {
|
||||
@@ -183,7 +177,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
public abstract class EventContainer : ChartEvent {
|
||||
public List<Chart.Motion> motions = new List<Chart.Motion>();
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public Clip Clip { get; private set; }
|
||||
|
||||
|
Reference in New Issue
Block a user