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

Method drawObject

code/main/CastleRoom2.ts:115–132  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

113 }
114
115 private drawObject(x: number, y: number): void{
116 // Draw the ascii art
117 this.renderArea.drawArray(Database.getAscii("places/castle/room2/pitchfork"), x, y);
118
119 // Add the button
120 this.renderArea.addMultipleAsciiButtons("castleRoom2TakeObjectButton",
121 x+6, x+12, y,
122 x+5, x+11, y+1,
123 x+4, x+10, y+2,
124 x+3, x+9, y+3,
125 x+2, x+8, y+4,
126 x+1, x+7, y+5,
127 x+1, x+5, y+6,
128 x, x+4, y+7);
129
130 // Add the link
131 this.renderArea.addLinkCall(".castleRoom2TakeObjectButton", new CallbackCollection(this.takeObject.bind(this)));
132 }
133
134 private lightFire(): void{
135 // Change the bool

Callers 1

updateMethod · 0.95

Calls 5

drawArrayMethod · 0.80
getAsciiMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80

Tested by

no test coverage detected