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

Method loadCandyBoxCharacter

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

Source from the content-addressed store, hash-verified

191 }
192
193 public loadCandyBoxCharacter(quest: Quest, firstTime: boolean = true): void{
194 // Set the type
195 this.characterType = PlayerCharacterType.CANDYBOX;
196
197 // Load stuff common to all characters if it's the first time we load the character in this quest
198 if(firstTime) this.loadCharacter(quest);
199
200 // Set the ascii representation (size + what it looks like)
201 this.setRenderArea(new RenderArea(3, 1));
202 this.drawOnRenderArea();
203
204 // Set the collision boxes
205 this.setCbc(new CollisionBoxCollection(new CollisionBox(this, new Pos(0, 0), new Pos(3, 1))));
206
207 // Transparency
208 this.setTransparency(null);
209 }
210
211 public loadCandyBoxSqueezedCharacter(quest: Quest, firstTime: boolean = true): void{
212 // Set the type

Callers 15

squeezeMethod · 0.95
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80

Calls 5

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

Tested by

no test coverage detected