设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

如何做游戏提示效果?

查看数: 1238 | 评论数: 3 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2013-12-10 20:56

正文摘要:

本帖最后由 110007 于 2013-12-10 21:19 编辑 rmxp游戏中如何做游戏提示效果,效果要跟右图一样,

回复

qq381055296 发表于 2013-12-11 05:07:04
估计没人帮你

评分

参与人数 1星屑 -50 收起 理由
myownroc -50 纯水

查看全部评分

110007 发表于 2013-12-10 21:14:18
脚本内容如下:
#使用方法:在事件中输入脚本    tip("提示内容") 即可
   class Window_Tip < Window_Base
     def initialize
       super(0,300,128,64)
       self.contents_opacity = 0
       self.opacity = 0
       self.contents = Bitmap.new(width - 32, height - 32)
       self.z = 9999
      
      
       @p = 0
     end
     
     def refresh
       text = $game_temp.tipping
       self.x = (580-(text.to_s.size / 3 * 32))/2
       self.width = (text.to_s.size / 3 * 32)+32
       self.contents = Bitmap.new(width - 32, height - 32)
       self.contents.draw_text(0, -2, (text.to_s.size / 3 * 32), 32, text,1)
       self.opacity=160
       case @p
       when 0..40
         self.opacity += 10
         self.contents_opacity += 10
         when (40 + $提示框弹出时间)..(70 + $提示框弹出时间)
            self.opacity -= 10
            self.contents_opacity -= 10
            when (71 + $提示框弹出时间)
              $game_temp.tipping = nil
              self.opacity = 0
              self.contents_opacity = 0
              @p = -1
            end
             @p += 1
           end
         end
         class Game_Temp
           attr_accessor :tipping
         end
         class Interpreter
           def tip(text)
             $game_temp.tipping = text
           end
         end
         class Scene_Map
           alias b_m main
           def main
             @tip = Window_Tip.new
             b_m
             @tip.dispose
             end
     end        
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-6-28 06:46

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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