function emptyFunc(){}function onEnterIncorrectOrientation(){document.getElementById("incorrect-orientation").style.display="block",document.body.style.marginBottom="0px"}function onLeaveIncorrectOrientation(){document.getElementById("incorrect-orientation").style.display="none"}function antialiasingEnable(e){if(cc._renderType==cc._RENDER_TYPE_CANVAS){var t=cc._renderContext;t.imageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e}}function screenResize(){if(cc.sys.isMobile){var e=cc.view.getFrameSize();e.width>e.height?onEnterIncorrectOrientation():onLeaveIncorrectOrientation()}setTimeout(function(){antialiasingEnable(!1)},10)}function onLoadedGame(){if(rnd.init([(Date.now()*Math.random()).toString()]),cc.spriteFrameCache.addSpriteFrames(res.atlas_data),cc.spriteFrameCache.addSpriteFrames(res.fire_data),cc.sys.localStorage){var e=localStorage.getItem("pickcraftsavegame");e&&(playerData=JSON.parse(e)),playerData.res.length>9&&(playerData.res.length=9)}cc.director.runScene(new PlayScene)}cc.game.onStart=function(){WebFont.load({google:{families:["Press Start 2P"]},timeout:2e3}),cc.view.adjustViewPort(!0),cc.view.setDesignResolutionSize(634,960,cc.ResolutionPolicy.SHOW_ALL),cc.view.resizeWithBrowserSize(!0),cc.view.setResizeCallback(screenResize),cc.view.enableAutoFullScreen(!0),screenResize(),prepareResources();var e=new RivasLoaderScene;e.init(),e.initWithResources(resources,onLoadedGame),cc.director.runScene(e)},window.onload=function(){cc.game.run()},window.onunload=function(){cc.sys.localStorage&&localStorage.setItem("pickcraftsavegame",JSON.stringify(playerData))};