protected Variable <bool> AddBoolean(Actor actor, int id) { var variable = new VBoolean(actor, id); actor.AddVariable(variable); return(variable); }
public Variable<bool> AddBoolean(int id, bool value) { if (this.actor == null) throw new InvalidOperationException("Cannot add variable after this.actor initialized"); var state = new RecordState(); var variable = new VBoolean(this.actor, id, state); variable.AddStepFrame(this.actor.StartTime, value); state.OnChange(this.actor.StartTime); this.actor.AddVariable(variable); return variable; }
public Variable <bool> AddBoolean(int id, bool value) { if (this.actor == null) { throw new InvalidOperationException("Cannot add variable after this.actor initialized"); } var state = new RecordState(); var variable = new VBoolean(this.actor, id, state); variable.AddStepFrame(this.actor.StartTime, value); state.OnChange(this.actor.StartTime); this.actor.AddVariable(variable); return(variable); }