示例#1
0
 public bool WantsSlowFall(ScreenInputSignal screenInputSignal)
 {
     if (Statics.MANAGER_INPUT.IsKeyPressed(Keys.D2))
     {
         return(true);
     }
     return(false);
 }
示例#2
0
 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;
 }
示例#3
0
        public bool WantsJumpBoost(ScreenInputSignal screenInputSignal)
        {
            if (Statics.MANAGER_INPUT.IsKeyPressed(Keys.D1))
            {
                return(true);
            }

            return(false);
        }
示例#4
0
        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);
        }
示例#5
0
        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);
        }
示例#6
0
 public bool WantsSlowFall(ScreenInputSignal screenInputSignal)
 {
     return(false);
 }
示例#7
0
 public bool WantsJumpBoost(ScreenInputSignal screenInputSignal)
 {
     return(false);
 }
示例#8
0
 public bool WantsToJump(ScreenInputSignal screenInputSignal)
 {
     return(Statics.Random.Next(100) < 5);
 }