/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Gets the player inputs at the specified frame. /// </summary> /// <returns>The player inputs.</returns> /// <param name="frame">Frame.</param> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public bool TryGetInput(long frame, out FluxFrameInput input) { KeyValuePair <FluxStates, FluxFrameInput> pair; bool result = this.TryGetStateAndInput(frame, out pair); input = pair.Value; return(result); }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the state of the game at the specified frame. /// </summary> /// <returns>Whether the state could be set successfully.</returns> /// <param name="frame">Frame.</param> /// <param name="state">The state.</param> /// <param name="input">The input that was applied to the specified state to get the next state.</param> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public bool TrySetState(FluxStates state, FluxFrameInput input) { return(this.TrySetState(new KeyValuePair <FluxStates, FluxFrameInput>(state, input))); }