幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1675|回复: 1

[RMVX] 关于玩的时侯时间的计算问题

[复制链接]

8

主题

35

帖子

541

积分

⑤进阶

积分
541
发表于 2006-3-25 09:34:46 | 显示全部楼层 |阅读模式
RGSS脚本是这样的
class Window_PlayTime < Window_Base
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #--------------------------------------------------------------------------
  
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
   
    self.contents.clear
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 100, 32, text, 2)
  
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
求助如何在自定义的画面里填入数字显示

[s:6]
可能说的不是太明白 [s:5]
回复

使用道具 举报

8

主题

35

帖子

541

积分

⑤进阶

积分
541
 楼主| 发表于 2006-3-25 12:23:07 | 显示全部楼层
这个问题更改一下
paly time里面的所显示时间的字体

例如:00:00:90
这个用什么代码定义的
我要把它用opacity来递减
可惜找不到
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2024-6-10 15:37 , Processed in 0.018153 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表