本文整理匯總了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);
}