<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國際加速解決方案。 廣告
                ![](https://box.kancloud.cn/140a6f3ed9750e7e19987ec1077c68c5_942x475.png) 舞臺是固定大小的,所展示出的一面,世界是大小可設置的,甚至無限大的。 ![](https://box.kancloud.cn/51f2225900c3b9686b7a74268d85f39c_936x325.png) ![](https://box.kancloud.cn/de0b2c5695a26eb3d94c5fb0dd9406d4_428x228.png) ![](https://box.kancloud.cn/6b696ce0fd182428b797e502ec24ef7d_362x541.png) ![](https://box.kancloud.cn/986601506ee62e1b2ac4ce6521d2fb47_983x373.png) ![](https://box.kancloud.cn/eea4f8fa32059a0c82b2274878031599_922x427.png) 攝像機大小默認是世界大小,如果設置世界大小很大 攝像機就可以移動啦, 例子: ~~~ var play = function(game){ this.init=function(){} this.preload = function(){ var fj = game.add.image(0,0,'fj') fj.anchor = {x:0.5,y:0.5} //設置圖片錨點 } this.create = function(){ console.log('play') game.world.setBounds(0,0,2000,600)//設置是世界大小 參數 左上角xy坐標,寬高 } this.update = function(){ var keys = game.input.keyboard.createCursorKeys() if(keys.right.isDown){game.camera.x += 1} else if(keys.left.isDown){game.camera.x -= 1} else if(keys.down.isDown){game.camera.y += 1} else if(keys.up.isDown){game.camera.y -= 1} } this.render = function(){} } ~~~ 相機即可跟著鍵盤移動而移動啦 相機聚焦到某個物體 ~~~ var play = function(game){ this.init=function(){} this.preload = function(){ var fj = game.add.image(0,0,'fj') } this.create = function(){ console.log('play') game.world.setBounds(0,0,2000,600)//設置是世界大小 參數 左上角xy坐標,寬高 pig = game.add.image(200,300,'pig') pig.anchor.set(0.5,0.5) game.camera.focusOn(pig) //相機聚焦到小豬上 } this.update = function(){ var keys = game.input.keyboard.createCursorKeys() if(keys.right.isDown){game.camera.x += 1} else if(keys.left.isDown){game.camera.x -= 1} else if(keys.down.isDown){game.camera.y += 1} else if(keys.up.isDown){game.camera.y -= 1} } this.render = function(){} } ~~~ ![](https://box.kancloud.cn/2c8a2b249c37735fdbda8436a464f6ad_332x512.png) 讓相機跟隨小豬移動` ~~~ game.camera.follow(pig) ~~~`
                  <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>

                              哎呀哎呀视频在线观看