public Variable<float> AddFloat(int id, float value) { if (this.actor == null) throw new InvalidOperationException("Cannot add variable after this.actor initialized"); var state = new RecordState(); var variable = new VFloat(this.actor, id, state); variable.AddStepFrame(this.actor.StartTime, value); state.OnChange(this.actor.StartTime); this.actor.AddVariable(variable); return variable; }
public Variable <int> AddInt32(int id, int value) { if (this.actor == null) { throw new InvalidOperationException("Cannot add variable after this.actor initialized"); } var state = new RecordState(); var variable = new VInt32(this.actor, id, state); variable.AddStepFrame(this.actor.StartTime, value); state.OnChange(this.actor.StartTime); this.actor.AddVariable(variable); return(variable); }