當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UI::puts方法代碼示例

本文整理匯總了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()));
 }
開發者ID:ngangchill,項目名稱:php-warrior,代碼行數:7,代碼來源:Game.php

示例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);
     }
 }
開發者ID:yandod,項目名稱:php-warrior,代碼行數:26,代碼來源:Level.php


注:本文中的UI::puts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。