<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                主要是用load的一些方法 ![](https://box.kancloud.cn/e11bcedfd2c4a177ef6e0d19c3a6139b_763x402.png) 加載事件,單個和全部 ![](https://box.kancloud.cn/4857f5f213e05f638e56d12e8cb14111_918x433.png) 值得一說的是我們的資源加載必須寫在preload周期里。 一個帶背景的和百分比文字的 進度加載場景 ~~~ var boot = function(game){ var progressText; this.init=function(){} this.preload = function(){ console.log("這里是boot") game.load.image('loading_bg','../img/loadingBg.png') var sprite = game.add.image(game.world.centerX,game.world.centerY,'loading_bg') sprite.anchor = {x:0.5,y:0.5} //設置圖片錨點 progressText = game.add.text(game.world.centerX,game.world.centerY+30,'0%',{fill:'#fff',fontSize:"16px"}) progressText.anchor = {x:0.5,y:0.5} // 監聽加載完一個文件的事件 game.load.onFileComplete.add(function (progress) { progressText.text = progress + '%'; }); // 監聽加載完畢事件 game.load.onLoadComplete.add(onLoad); // 最小展示時間,示例為2秒 var deadLine = false; setTimeout(function () { deadLine = true; }, 1000); // 加載完畢回調方法 function onLoad() { if (deadLine) { // 已到達最小展示時間,可以進入下一個場景 game.state.start('load'); } else { // 還沒有到最小展示時間,1秒后重試 setTimeout(onLoad, 500); } } } this.create = function(){ } this.updata = function(){} this.render = function(){} } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看