Set() public method

public Set ( bool state ) : void
state bool
return void
示例#1
0
        public bool UpdateWithState(bool state, ulong updateTick, float deltaTime)
        {
            PrepareForUpdate(updateTick);

            nextState.Set(state || nextState.State);

            return(state);
        }
示例#2
0
        public bool UpdateWithState(bool state, ulong updateTick, float deltaTime)
        {
            if (this == InputControl.Null)
            {
                return(false);
            }

            PrepareForUpdate(updateTick);

            nextState.Set(state || nextState.State);

            return(state);
        }
示例#3
0
        public void UpdateWithState(bool state, ulong updateTick)
        {
            if (IsNull)
            {
                throw new InvalidOperationException("A null control cannot be updated.");
            }

            if (UpdateTick > updateTick)
            {
                throw new InvalidOperationException("A control cannot be updated with an earlier tick.");
            }

            tempState.Set(state || tempState.State);
        }
示例#4
0
        public void UpdateWithState(bool state, float updateTime)
        {
            if (IsNull)
            {
                throw new InvalidOperationException("A null control cannot be updated.");
            }

            lastState = thisState;

            if (thisState != state)
            {
                UpdateTime = updateTime;
                thisState.Set(state);
            }
        }
        public void UpdateWithValue(float value, ulong updateTick, float stateThreshold)
        {
            if (UpdateTick > updateTick)
            {
                throw new InvalidOperationException("A control cannot be updated with an earlier tick.");
            }

            lastState = thisState;

            thisState.Set(value, stateThreshold);

            if (thisState != lastState)
            {
                UpdateTick = updateTick;
            }
        }