當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Armor類代碼示例

本文整理匯總了PHP中Armor的典型用法代碼示例。如果您正苦於以下問題:PHP Armor類的具體用法?PHP Armor怎麽用?PHP Armor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Armor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadArmor

 function loadArmor($ID)
 {
     //check ID is not blank and exists and such
     $db = DB::GetConn();
     $id_con = $db->quoteInto("ID = ?", $ID);
     $getQuery = "SELECT * FROM `Armor` WHERE {$id_con} limit 1;";
     $res = $db->query($getQuery);
     $obj = $res->fetchObject();
     return Armor::loadArmorFromObject($obj);
 }
開發者ID:kroony,項目名稱:squealing-funicular,代碼行數:10,代碼來源:armor.php

示例2: __construct

 public function __construct(\Weapon $weapon, \Armor $armor, array $rings = [], $hp = 100)
 {
     $this->hp = $hp;
     $this->damage = $weapon->getDamage();
     $this->cost += $weapon->getCost();
     $this->armor = $armor->getArmor();
     $this->cost += $armor->getCost();
     foreach ($rings as $ring) {
         $this->damage += $ring->getDamage();
         $this->armor += $ring->getArmor();
         $this->cost += $ring->getCost();
     }
 }
開發者ID:boast,項目名稱:adventofcode,代碼行數:13,代碼來源:day_21.php

示例3: getProtection

 public function getProtection()
 {
     return parent::getProtection() + 6;
 }
開發者ID:Cecil107,項目名稱:PocketMine-0.13.0,代碼行數:4,代碼來源:IronChestplate.php

示例4: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_BOOTS, $meta, $count, "Gold Boots");
 }
開發者ID:mattiasaxelsson,項目名稱:PocketMine-MP,代碼行數:4,代碼來源:GoldBoots.php

示例5: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::CHAIN_HELMET, $meta, $count, "Chainmail Helmet");
 }
開發者ID:iTXTech,項目名稱:Genisys,代碼行數:4,代碼來源:ChainHelmet.php

示例6: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::LEATHER_PANTS, $meta, $count, "Leather Pants");
 }
開發者ID:TexusDark,項目名稱:Ananas-MP,代碼行數:4,代碼來源:LeatherPants.php

示例7: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_CHESTPLATE, $meta, $count, "Gold Chestplate");
 }
開發者ID:ClearSkyTeam,項目名稱:ClearSky,代碼行數:4,代碼來源:GoldChestplate.php

示例8: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::CHAIN_LEGGINGS, $meta, $count, "Chain Leggings");
 }
開發者ID:orlando092,項目名稱:ImagicalMine,代碼行數:4,代碼來源:ChainLeggings.php

示例9: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::IRON_BOOTS, $meta, $count, "Iron Boots");
 }
開發者ID:ClearSkyTeam,項目名稱:ClearSky,代碼行數:4,代碼來源:IronBoots.php

示例10: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::LEATHER_CAP, $meta, $count, "Leather Cap");
 }
開發者ID:iTXTech,項目名稱:Genisys,代碼行數:4,代碼來源:LeatherCap.php

示例11: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::LEATHER_TUNIC, $meta, $count, "Leather Tunic");
 }
開發者ID:robozeri,項目名稱:Yuriko-MP,代碼行數:4,代碼來源:LeatherTunic.php

示例12: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DIAMOND_HELMET, $meta, $count, "Diamond Helmet");
 }
開發者ID:mattiasaxelsson,項目名稱:PocketMine-MP,代碼行數:4,代碼來源:DiamondHelmet.php

示例13: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_LEGGINGS, $meta, $count, "Gold Leggings");
 }
開發者ID:ecoron,項目名稱:MinionsLandPE,代碼行數:4,代碼來源:GoldLeggings.php

示例14: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::CHAIN_BOOTS, $meta, $count, "Chainmail Boots");
 }
開發者ID:robozeri,項目名稱:Yuriko-MP,代碼行數:4,代碼來源:ChainBoots.php

示例15: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DIAMOND_CHESTPLATE, $meta, $count, "Diamond Chestplate");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:4,代碼來源:DiamondChestplate.php


注:本文中的Armor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。