本文整理汇总了PHP中SR_Player::hasKnowledge方法的典型用法代码示例。如果您正苦于以下问题:PHP SR_Player::hasKnowledge方法的具体用法?PHP SR_Player::hasKnowledge怎么用?PHP SR_Player::hasKnowledge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SR_Player
的用法示例。
在下文中一共展示了SR_Player::hasKnowledge方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRespawnLocation
public function getRespawnLocation(SR_Player $player)
{
if ($player->getNuyen() > 200 && $player->hasKnowledge('places', 'Vegas_Hotel')) {
return 'Vegas_Hotel';
}
return Shadowrun4::getCity('Chicago')->getRespawnLocation($player);
}
示例2: getRespawnLocation
public function getRespawnLocation(SR_Player $player)
{
if ($player->getNuyen() > 100 && $player->hasKnowledge('places', 'Seattle_Hotel')) {
return 'Seattle_Hotel';
}
return parent::getRespawnLocation($player);
}
示例3: getRespawnLocation
public function getRespawnLocation(SR_Player $player)
{
if ($player->getNuyen() > 300 && $player->hasKnowledge('places', 'Chicago_Hotel')) {
return 'Chicago_Hotel';
} else {
return Shadowrun4::getCity('Delaware')->getRespawnLocation($player);
}
}
示例4: giveKnowB
private static function giveKnowB(SR_Player $player, SR_Player $target, $what, $which)
{
if (false === $target->hasKnowledge($what, $which)) {
$target->giveKnowledge($what, $which);
$player->getParty()->ntice('5117', array($player->getName(), $target->getName(), $which));
// $player->getParty()->message($player, sprintf(' told %s about %s.', $target->getName(), $which));
}
return true;
}