public bool WantsSlowFall(ScreenInputSignal screenInputSignal) { if (Statics.MANAGER_INPUT.IsKeyPressed(Keys.D2)) { return(true); } return(false); }
private void SetInputSignalArray(ISignalArray inputSignalArray, ScreenInputSignal screenInputSignal) { inputSignalArray[0] = screenInputSignal.YTopBirdCoordinate; inputSignalArray[1] = screenInputSignal.YBottomBirdCoordinate; inputSignalArray[2] = screenInputSignal.DistanceToNextObstacle; inputSignalArray[3] = screenInputSignal.ObstacleBoundary1; inputSignalArray[4] = screenInputSignal.ObstacleBoundary2; inputSignalArray[5] = screenInputSignal.IsBirdDead ? 1 : 0; }
public bool WantsJumpBoost(ScreenInputSignal screenInputSignal) { if (Statics.MANAGER_INPUT.IsKeyPressed(Keys.D1)) { return(true); } return(false); }
public bool WantsToJump(ScreenInputSignal screenInputSignal) { // Clear the network _brain.ResetState(); // Convert the game board into an input array for the network SetInputSignalArray(_brain.InputSignalArray, screenInputSignal); // Activate the network _brain.Activate(); return(_brain.OutputSignalArray[0] == 1); }
public bool WantsToJump(ScreenInputSignal screenInputSignal) { if (Statics.MANAGER_INPUT.IsKeyPressed(Keys.Space) || Statics.MANAGER_INPUT.IsLeftMouseClicked()) { return(true); } if (Statics.MANAGER_INPUT.CurrentGamePadState().DPad.Up == ButtonState.Pressed) { return(true); } if (Statics.MANAGER_INPUT.IsGamepadPressed(Buttons.A)) { return(true); } return(false); }
public bool WantsSlowFall(ScreenInputSignal screenInputSignal) { return(false); }
public bool WantsJumpBoost(ScreenInputSignal screenInputSignal) { return(false); }
public bool WantsToJump(ScreenInputSignal screenInputSignal) { return(Statics.Random.Next(100) < 5); }