当前位置: 首页>>代码示例>>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;未经允许,请勿转载。