本文整理匯總了PHP中Shadowrun4::sr_timestamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shadowrun4::sr_timestamp方法的具體用法?PHP Shadowrun4::sr_timestamp怎麽用?PHP Shadowrun4::sr_timestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shadowrun4
的用法示例。
在下文中一共展示了Shadowrun4::sr_timestamp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: shadowTimer
public static function shadowTimer()
{
# 1 second over in the Shadowlamb world.
self::$sr_timestamp = GWF_Counter::getAndCount('SR4_TIME', self::SECONDS_PER_TICK);
# Execute Web Commands
// self::shadowTimerWebcommands();
if (defined('SL4_REALS')) {
self::shadowTimerRealNPCs();
}
# All parties:
$partyids = array_keys(self::$parties);
shuffle($partyids);
# Shuffle which party goes first to have evenly distributed winners in race conditions.
foreach ($partyids as $id) {
# still there?
if (isset(self::$parties[$id])) {
if (self::$parties[$id]->getTimestamp() < time() - self::KICK_IDLE_TIMEOUT) {
self::removeParty(self::$parties[$id]);
} else {
self::$parties[$id] instanceof SR_Party;
self::$parties[$id]->timer(self::$sr_timestamp);
}
}
}
# Next tick in one second pls.
Dog_Timer::addTimer(array(__CLASS__, 'shadowTimer'), NULL, self::TICKLEN, false);
}