本文整理汇总了PHP中Shadowfunc::displayLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP Shadowfunc::displayLevel方法的具体用法?PHP Shadowfunc::displayLevel怎么用?PHP Shadowfunc::displayLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shadowfunc
的用法示例。
在下文中一共展示了Shadowfunc::displayLevel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayMembers
public function displayMembers($with_distance = false, $with_levels = false)
{
if ($this->getMemberCount() === 0) {
return 'This party is empty! (should not see me)';
}
$b = chr(2);
$back = '';
foreach ($this->members as $player) {
$player instanceof SR_Player;
$dist = $with_distance ? sprintf('(%.01fm)', $this->distance[$player->getID()]) : '';
$level = $with_levels ? Shadowfunc::displayLevel($player) : '';
$rmod = $player->isOptionEnabled(SR_Player::RUNNING_MODE) ? '[RM]' : '';
$pbot = $player->isOptionEnabled(SR_Player::PLAYER_BOT) ? '[BOT]' : '';
$race = '[' . Shadowfunc::translateVariable($player, '_' . $player->getRace()) . ']';
$back .= sprintf(', %s-%s%s%s%s%s%s', $b . $player->getEnum() . $b, $player->getName(), $dist, $level, $pbot, $rmod, $race);
}
return substr($back, 2);
}