本文整理匯總了PHP中UI::puts方法的典型用法代碼示例。如果您正苦於以下問題:PHP UI::puts方法的具體用法?PHP UI::puts怎麽用?PHP UI::puts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UI
的用法示例。
在下文中一共展示了UI::puts方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: go_back_to_normal_mode
public function go_back_to_normal_mode()
{
$this->profile->enable_normal_mode();
$this->prepare_next_level();
UI::puts(__("Another level has been added since you started epic, going back to normal mode."));
UI::puts(sprintf(__("See the updated README in the phpwarrior/%s directory."), $this->profile->directory_name()));
}
示例2: tally_points
public function tally_points()
{
$score = 0;
UI::puts(sprintf(__("Level Score: %s"), $this->warrior->score));
$score += $this->warrior->score;
UI::puts(sprintf(__("Time Bonus: %s"), $this->time_bonus));
$score += $this->time_bonus;
if (count($this->floor->other_units()) == 0) {
UI::puts(sprintf(__("Clear Bonus: %s"), $this->clear_bonus()));
$score += $this->clear_bonus();
}
if ($this->profile->is_epic()) {
if ($this->grade_for($score)) {
UI::puts(sprintf(__("Level Grade: %s"), $this->grade_for($score)));
}
UI::puts(sprintf(__("Total Score: %s"), $this->score_calculation($this->profile->current_epic_score, $score)));
if ($this->ace_score) {
$this->profile->current_epic_grades[$this->number] = $score / $this->ace_score;
}
$this->profile->current_epic_score += $score;
} else {
UI::puts(sprintf(__("Total Score: %s"), $this->score_calculation($this->profile->score, $score)));
$this->profile->score += $score;
$this->profile->abilities = array_keys($this->warrior->abilities);
}
}