(facingRight: boolean = true)
| 106 | } |
| 107 | |
| 108 | public getSpellCastingPosition(facingRight: boolean = true): Pos{ |
| 109 | switch(this.characterType){ |
| 110 | case PlayerCharacterType.CANDYBOX: |
| 111 | if(facingRight) return this.getGlobalPosition().plus(new Pos(3, -1)); |
| 112 | else return this.getGlobalPosition().plus(new Pos(-1, -1)); |
| 113 | break; |
| 114 | case PlayerCharacterType.MEDIUM: |
| 115 | if(facingRight) return this.getGlobalPosition().plus(new Pos(11, 0)); |
| 116 | else return this.getGlobalPosition().plus(new Pos(-1, 0)); |
| 117 | break; |
| 118 | case PlayerCharacterType.CANDYBOX_SQUEEZED: |
| 119 | if(facingRight) return this.getGlobalPosition().plus(new Pos(0, -1)); |
| 120 | else return this.getGlobalPosition().plus(new Pos(0, -1)); |
| 121 | break; |
| 122 | case PlayerCharacterType.MEDIUM_SQUEEZED: |
| 123 | if(facingRight) return this.getGlobalPosition().plus(new Pos(6, 0)); |
| 124 | else return this.getGlobalPosition().plus(new Pos(-1, 0)); |
| 125 | break; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | public getThornsPositionsArray(): Pos[]{ |
| 130 | // Create the array |
no test coverage detected