本文整理汇总了PHP中Armor类的典型用法代码示例。如果您正苦于以下问题:PHP Armor类的具体用法?PHP Armor怎么用?PHP Armor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Armor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: __construct
public function __construct($meta = 0, $count = 1)
{
parent::__construct(self::DIAMOND_LEGGINGS, $meta, $count, "Diamond Leggings");
}
开发者ID:gitter-badger,项目名称:BukkitPE,代码行数:4,代码来源:DiamondLeggings.php
示例17: __construct
public function __construct($meta = 0, $count = 1)
{
parent::__construct(self::GOLD_HELMET, $meta, $count, "Gold Helmet");
}
开发者ID:gitter-badger,项目名称:BukkitPE,代码行数:4,代码来源:GoldHelmet.php
示例18: __construct
public function __construct($meta = 0, $count = 1)
{
parent::__construct(self::DIAMOND_BOOTS, $meta, $count, "Diamond Boots");
}
开发者ID:mattiasaxelsson,项目名称:PocketMine-MP,代码行数:4,代码来源:DiamondBoots.php
示例19: __construct
public function __construct($meta = 0, $count = 1)
{
parent::__construct(self::IRON_LEGGINGS, $meta, $count, "Iron Leggings");
}
开发者ID:MunkySkunk,项目名称:BukkitPE,代码行数:4,代码来源:IronLeggings.php
示例20: __construct
public function __construct($meta = 0, $count = 1)
{
parent::__construct(self::IRON_HELMET, $meta, $count, "Iron Helmet");
}
开发者ID:xpyctum,项目名称:Genisys,代码行数:4,代码来源:IronHelmet.php
注:本文中的Armor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论