app/data/ct.libs/place/index.js
/**
         * Applied to copies in the debug mode. Draws a collision shape
         * @this Copy
         * @returns {void}
         */
Applied to copies in the debug mode. Draws a collision shape
@this Copy
@returns {void}
Applied to copies in the debug mode . Draws a collision shape @this Copy @returns { void }
drawDebugGraphic() {
            const shape = this._shape || getSSCDShape(this);
            const g = this.$cDebugCollision;
            const color = this.$cHadCollision ? 0x00ff00 : 0x0066ff;
            if (shape instanceof SSCD.Rectangle) {
                const pos = shape.get_position(),
                      size = shape.get_size();
                g.lineStyle(2, color)
                .drawRect(pos.x - this.x, pos.y - this.y, size.x, size.y);
            } else if (shape instanceof SSCD.LineStrip) {
                g.lineStyle(2, color)
                .moveTo(shape.__points[0].x, shape.__points[0].y);
                for (let i = 1; i < shape.__points.length; i++) {
                    g.lineTo(shape.__points[i].x, shape.__points[i].y);
                }
            } else if (shape instanceof SSCD.Circle) {
                g.lineStyle(2, color)
                .drawCircle(0, 0, shape.get_radius());
            } else {
                g.lineStyle(4, 0xff0000)
                .moveTo(-40, -40)
                .lineTo(40, 40)
                .moveTo(-40, 40)
                .lineTo(40, -40);
            }
        }
drawDebugGraphic ( ) { const shape = this . _shape || getSSCDShape ( this ) ; const g = this . $cDebugCollision ; const color = this . $cHadCollision ? 0x00ff00 : 0x0066ff ; if ( shape instanceof SSCD . Rectangle ) { const pos = shape . get_position ( ) , size = shape . get_size ( ) ; g . lineStyle ( 2 , color ) . drawRect ( pos . x - this . x , pos . y - this . y , size . x , size . y ) ; } else if ( shape instanceof SSCD . LineStrip ) { g . lineStyle ( 2 , color ) . moveTo ( shape . __points [ 0 ] . x , shape . __points [ 0 ] . y ) ; for ( let i = 1 ; i < shape . __points . length ; i ++ ) { g . lineTo ( shape . __points [ i ] . x , shape . __points [ i ] . y ) ; } } else if ( shape instanceof SSCD . Circle ) { g . lineStyle ( 2 , color ) . drawCircle ( 0 , 0 , shape . get_radius ( ) ) ; } else { g . lineStyle ( 4 , 0xff0000 ) . moveTo ( - 40 , - 40 ) . lineTo ( 40 , 40 ) . moveTo ( - 40 , 40 ) . lineTo ( 40 , - 40 ) ; } }
Applied to copies in the debug mode.
Applied to copies in the debug mode .