<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                >[danger] 項目版本 現在項目中使用的egret版本是2.0.4,建議在此版本基礎上開發新游戲。[下載地址](http://sedn.egret.com//soft/egret/egret-core-2.0.4.zip) >[danger] 項目結構 1》Lancher項目中的index.html文件需要先引入以下代碼 ~~~ <script src="http://wx.9tech.cn/open/beesdk.php?v=201512241231&_env=testing"></script> <script src="http://static.beetobees.com/wx/common/zepto.min.js,wx/common/md5.js,wx/common/base64.js,wx/common/wx.jssdk.js,wx/js/9riasdk.js"></script> <link rel="stylesheet" href="http://static.9tech.cn/wx/css/gamePublic.css"> <script src="http://static.9tech.cn/wx/js/9riasdk.js"></script> <script src="http://static.9tech.cn/wx/js/gamePublic.js"></script> ~~~ 2》 整體項目結構與正常egret項目相同,不同處為src文件夾下的ts文件,此處著重講解。 ![](https://box.kancloud.cn/08e18bb1e80fdf7d674ad538e61bd2a0_208x394.png) 3》目錄解釋 | 文件夾名稱 | 元素 |描述 | | --- | --- | --- | | componentExt | LoadingPanel.ts |加載界面文件,因為在此處是有服務器端代碼執行加載邏輯,所以此處只需要告知游戲中的加載進度即可,即只需要使用setProgress函數即可 | | --- | VerticalTipsPanel.ts | 橫屏提示界面文件,此處使用在橫屏游戲中 | | --- | WaitPanel.ts |通訊界面,等待時可new出此類,界面為一個轉動圈 | | Core | component | 文件夾下的為一些動態效果,可以自行在代碼中執行觀看效果 | | --- | config |文件夾下的GameConfig.ts是項目中的公用配置參數 | | --- | data |文件夾下的文件是項目中使用到的全局變量 | | --- | core |文件夾下的是網絡相關類,項目中可不是用 | | --- | notification |文件夾下的MainNotify.ts是定義處理消息的類文件 | | --- | utils |文件夾下類文件都是一些常用的方法合集類 | | --- | views |文件夾下項目中各種層級類文件、消息處理類、面板彈出的管理類 | | platformEx |platUtils | 文件中的PlatformUtils.ts文件是獲得template.json文件中相關信息的類文件 | | view | --- | 此文件夾中寫游戲相關的邏輯即可 | | --- | StartPanel.ts | 游戲開始界面,此處寫開始界面的邏輯即可;點擊可是按鈕后必須執行`window["beeGame"].gameStar();` | | --- | GamePanel.ts | 游戲界面,此處寫游戲邏輯 | | --- | GameOverPanel.ts | 游戲結束界面時候在initPanel()函數中定義`window["beeGame"].gameEnd(GlobalData.currentScore,true);window['tryAgain'] = this.tryAgain;` | | GameApp.ts | --- | | >[danger] componentExt文件夾中,WaitPanel.ts等待界面用法 打開 ~~~ Global.waitPanel = new WaitPanel(1); GameConfig.gameScene().maskLayer.removeChildren(); GameConfig.gameScene().maskLayer.addChild( Global.waitPanel ); ~~~ 關閉 ~~~ GameConfig.gameScene().maskLayer.removeChild( Global.waitPanel ); Global.waitPanel = null; ~~~
                  <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>

                              哎呀哎呀视频在线观看