Ejemplo n.º 1
0
        protected Variable <bool> AddBoolean(Actor actor, int id)
        {
            var variable = new VBoolean(actor, id);

            actor.AddVariable(variable);
            return(variable);
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }