Pull down chart field from StateBase.

This commit is contained in:
2023-01-15 11:52:28 +08:00
parent c39f258a19
commit 898fb7d557
3 changed files with 5 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ namespace Cryville.Crtr.Event {
get;
private set;
}
ContainerState RootState;
readonly Chart chart;
readonly Dictionary<ChartEvent, ContainerState> containerMap
= new Dictionary<ChartEvent, ContainerState>();
readonly Dictionary<EventContainer, ContainerState> stateMap
@@ -25,7 +25,8 @@ namespace Cryville.Crtr.Event {
double beat;
float tempo;
public EventBatcher(Chart c) : base(c, new List<ChartEvent>()) {
public EventBatcher(Chart c) : base(new List<ChartEvent>()) {
chart = c;
beat = chart.BeatPosition;
tempo = (float)c.sigs[0].tempo;
events.Add(c);

View File

@@ -18,8 +18,7 @@ namespace Cryville.Crtr.Event {
HashSet<ContainerState> invalidatedStates
= new HashSet<ContainerState>();
public EventBus(Chart c, ContainerState root, List<EventBatch> b)
: base(c, b) {
public EventBus(ContainerState root, List<EventBatch> b) : base(b) {
RootState = root;
Expand();
AttachBus();

View File

@@ -5,13 +5,11 @@ namespace Cryville.Crtr {
public abstract class StateBase<T> {
public int EventId;
public double Time;
public Chart chart;
public List<T> events;
bool breakflag = false;
public StateBase(Chart c, List<T> evs) {
chart = c;
public StateBase(List<T> evs) {
events = evs;
EventId = 0;
Time = 0;