• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    極客戰記-穿越

    若是你卡在這里了,那么看看這個攻略吧

    籌辦工作

    1. 1

      選擇英雄和編程說話

    2. 2

      選擇裝備

    3. 3

      寫中文注釋

    python

    1. 1

      寫代碼

      # Don't insult this tribe of peaceful ogres.

      while True:

          item = hero.findNearestItem()

          if item:

              # If item.type IS NOT EQUAL TO "gem"

              if item.type != "gem":

                  # 然后跟從你的寵物。

                  hero.moveXY(pet.pos.x, pet.pos.y)

              # 不然:

              else:

                  # 移動到寶石的坐標。

                  hero.moveXY(item.pos.x, item.pos.y)

    2. 2

      運行

    javascript

    1. 1

      寫代碼

      // 不要欺侮這個和平食人魔部落

      while(true) {

          var item = hero.findNearestItem();

          if(item) {

              // 若是item.type不等于 "gem"

              if(item.type != "gem") {

                  // 然后跟從你的寵物。

                  hero.moveXY(pet.pos.x, pet.pos.y);

              }

              // 不然:

              else {

                  // 移動到寶石的坐標。

                  hero.moveXY(item.pos.x, item.pos.y);

              }

          }

      }

    2. 2

      運行

    coffeescript

    1. 1

      寫代碼

      # Don't insult this tribe of peaceful ogres.

      while true        

          item = hero.findNearestItem()

          if item

              # If item.type IS NOT EQUAL TO "gem"

              if item.type != "gem"

                  # 然后跟從你的寵物。

                  hero.moveXY(pet.pos.x, pet.pos.y)

              # 不然:

              else

                  # 移動到寶石的坐標。

                  hero.moveXY(item.pos.x, item.pos.y)

    2. 2

      運行

    lua

    1. 1

      寫代碼

      -- 不要欺侮這個和平食人魔部落

      while true do

          local item = hero:findNearestItem()

          if item then

              -- 若是item.type不等于 "gem"

              if item.type ~= "gem" then

                  -- 然后跟從你的寵物。

                  hero:moveXY(pet.pos.x, pet.pos.y)

              -- 不然:

              else

                  -- 移動到寶石的坐標。

                  hero:moveXY(item.pos.x, item.pos.y)

              end

          end

      end

    2. 2

      運行

    • 發表于 2018-05-20 00:00
    • 閱讀 ( 805 )
    • 分類:其他類型

    你可能感興趣的文章

    相關問題

    0 條評論

    請先 登錄 后評論
    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆