Set() public méthode

public Set ( bool state ) : void
state bool
Résultat void
Exemple #1
0
        public bool UpdateWithState(bool state, ulong updateTick, float deltaTime)
        {
            PrepareForUpdate(updateTick);

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

            return(state);
        }
Exemple #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);
        }
Exemple #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);
        }
        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;
            }
        }