Created
June 22, 2015 13:31
-
-
Save novogrammer/4f22a7df63e92e5375f5 to your computer and use it in GitHub Desktop.
CreateJSで透明なMovieClipの当たり判定をそれっぽくするやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setupHitArea(mc){ | |
var b=mc.getBounds(); | |
mc.hitArea=new createjs.Shape(); | |
mc.hitArea.graphics=new createjs.Graphics().beginFill("#FFF").drawRect(b.x,b.y,b.width,b.height); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment