MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / loadCandyBoxSqueezedCharacter

Method loadCandyBoxSqueezedCharacter

code/main/Player.ts:211–227  ·  view source on GitHub ↗
(quest: Quest, firstTime: boolean = true)

Source from the content-addressed store, hash-verified

209 }
210
211 public loadCandyBoxSqueezedCharacter(quest: Quest, firstTime: boolean = true): void{
212 // Set the type
213 this.characterType = PlayerCharacterType.CANDYBOX_SQUEEZED;
214
215 // Load stuff common to all characters if it's the first time we load the character in this quest
216 if(firstTime) this.loadCharacter(quest);
217
218 // Set the ascii representation (size + what it looks like)
219 this.setRenderArea(new RenderArea(1, 1));
220 this.drawOnRenderArea();
221
222 // Set the collision boxes
223 this.setCbc(new CollisionBoxCollection(new CollisionBox(this, new Pos(0, 0), new Pos(1, 1))));
224
225 // Transparency
226 this.setTransparency(null);
227 }
228
229 public loadCharacter(quest: Quest): void{
230 // Set the quest

Callers 1

squeezeMethod · 0.95

Calls 5

loadCharacterMethod · 0.95
drawOnRenderAreaMethod · 0.95
setRenderAreaMethod · 0.80
setCbcMethod · 0.80
setTransparencyMethod · 0.80

Tested by

no test coverage detected