CocosCreator_获取屏幕尺寸

let windowSize=cc.view.getVisibleSize();
cc.log("width="+windowSize.width+",height="+windowSize.height);;
windowSize=cc.winSize;//推荐  原因  短
cc.log("width="+windowSize.width+",height="+windowSize.height);

你可能感兴趣的:(CocosCreator)