(player)
| 73 | } |
| 74 | |
| 75 | loadStateToPlayer(player) { |
| 76 | player.currentPos = this.currentPos.copy(); |
| 77 | player.currentSpeed = this.currentSpeed.copy(); |
| 78 | player.isOnGround = this.isOnGround |
| 79 | |
| 80 | |
| 81 | player.blizzardForce = this.blizzardForce; |
| 82 | player.blizzardForceAccelerationDirection = this.blizzardForceAccelerationDirection; |
| 83 | player.maxBlizzardForceTimer = this.maxBlizzardForceTimer; |
| 84 | player.snowImagePosition = this.snowImagePosition; |
| 85 | |
| 86 | // player.blizzardForce = 0; |
| 87 | // player.blizzardForceAccelerationDirection = 1; |
| 88 | // player.maxBlizzardForceTimer = 0; |
| 89 | // player.snowImagePosition = 0; |
| 90 | |
| 91 | player.bestHeightReached = this.bestHeightReached; |
| 92 | player.bestLevelReached = this.bestLevelReached; |
| 93 | player.reachedHeightAtStepNo = this.reachedHeightAtStepNo; |
| 94 | player.bestLevelReachedOnActionNo = this.bestLevelReachedOnActionNo; |
| 95 | player.brain.currentInstructionNumber = this.brainActionNumber; |
| 96 | |
| 97 | player.currentLevelNo = this.currentLevelNo; |
| 98 | player.jumpStartingHeight = this.jumpStartingHeight; |
| 99 | player.facingRight = this.facingRight; |
| 100 | |
| 101 | |
| 102 | // player.isWaitingToStartAction = this.isWaitingToStartAction; |
| 103 | // player.actionStarted = this.actionStarted; |
| 104 | } |
| 105 | |
| 106 | clone() { |
| 107 | let clone = new PlayerState(); |
no outgoing calls
no test coverage detected