Created
August 28, 2025 20:20
-
-
Save gamesbyangelina/4bd9321d26de57c33cd94de7df5d39aa to your computer and use it in GitHub Desktop.
Run Specification: Breakout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using GameFeelDescriptions.Examples; | |
| public class BreakoutRunSpec : RunSpec | |
| { | |
| public BreakoutRunSpec(){ | |
| this.runsPerSolution = 1; | |
| } | |
| public override void OnRunStart(int run){ | |
| //Consistent seed between runs | |
| UnityEngine.Random.InitState(0); | |
| //Activate the autoplayer | |
| paddleBehavior.instance.ballFollow = true; | |
| ballBehavior.instance.ballReady = false; | |
| } | |
| public override void OnRunComplete(int run){ | |
| } | |
| public override float ScoreRun(int run){ | |
| //Rating is just player score, capped at 400, and normalised | |
| return Mathf.Min(increaseScore.instance.currentScore/400f, 1f); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment