| 47 | } |
| 48 | |
| 49 | getStateFromPlayer(player) { |
| 50 | this.currentPos = player.currentPos.copy(); |
| 51 | this.currentSpeed = player.currentSpeed.copy(); |
| 52 | this.isOnGround = player.isOnGround |
| 53 | |
| 54 | |
| 55 | this.blizzardForce = player.blizzardForce; |
| 56 | this.blizzardForceAccelerationDirection = player.blizzardForceAccelerationDirection; |
| 57 | this.maxBlizzardForceTimer = player.maxBlizzardForceTimer; |
| 58 | this.snowImagePosition = player.snowImagePosition; |
| 59 | |
| 60 | |
| 61 | this.bestHeightReached = player.bestHeightReached; |
| 62 | this.bestLevelReached = player.bestLevelReached; |
| 63 | this.reachedHeightAtStepNo = player.reachedHeightAtStepNo; |
| 64 | this.bestLevelReachedOnActionNo = player.bestLevelReachedOnActionNo; |
| 65 | this.brainActionNumber = player.brain.currentInstructionNumber; |
| 66 | |
| 67 | this.currentLevelNo = player.currentLevelNo; |
| 68 | this.jumpStartingHeight = player.jumpStartingHeight; |
| 69 | this.facingRight = player.facingRight; |
| 70 | |
| 71 | this.isWaitingToStartAction = player.isWaitingToStartAction; |
| 72 | this.actionStarted = player.actionStarted; |
| 73 | } |
| 74 | |
| 75 | loadStateToPlayer(player) { |
| 76 | player.currentPos = this.currentPos.copy(); |