()
| 18 | |
| 19 | class PlayerState { |
| 20 | constructor() { |
| 21 | this.currentPos = createVector(width / 2, height - 200); // this is the top left corner of the hitbox |
| 22 | this.currentSpeed = createVector(0, 0); |
| 23 | this.isOnGround = false; |
| 24 | |
| 25 | |
| 26 | this.blizzardForce = 0; |
| 27 | this.blizzardForceAccelerationDirection = 1; |
| 28 | this.maxBlizzardForceTimer = 0; |
| 29 | this.snowImagePosition = 0; |
| 30 | |
| 31 | |
| 32 | this.bestHeightReached = 0; |
| 33 | this.bestLevelReached = 0; |
| 34 | this.reachedHeightAtStepNo = 0; |
| 35 | this.bestLevelReachedOnActionNo = 0; |
| 36 | |
| 37 | this.brainActionNumber = 0 |
| 38 | |
| 39 | this.currentLevelNo = 0; |
| 40 | this.jumpStartingHeight = 0; |
| 41 | this.facingRight = true; |
| 42 | |
| 43 | |
| 44 | this.isWaitingToStartAction = false; |
| 45 | this.actionStarted = false; |
| 46 | |
| 47 | } |
| 48 | |
| 49 | getStateFromPlayer(player) { |
| 50 | this.currentPos = player.currentPos.copy(); |
nothing calls this directly
no outgoing calls
no test coverage detected