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

Project1

 找回密码
 注册会员
搜索
查看: 2410|回复: 2
打印 上一主题 下一主题

[已经解决] 如何让视频播放及对话框显示并行处理?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
173
在线时间
179 小时
注册时间
2011-4-16
帖子
63
跳转到指定楼层
1
发表于 2014-11-2 04:05:54 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 swbsl 于 2014-11-2 04:39 编辑



上图是我PS的。。。请问要怎样才能达到这个效果?

这个场景是玩家点选 “开始新游戏” 后加载的,地图块全黑,只添加了人物初始化位置和对话框普通事件。想一边自动播放视频一边操作对话框,对话结束后,视频自动终止,然后跳转到另一个地图。

PS:视频我已经转好了,就差这个并行处理的方法。
汉化工作不定期更新中...

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2207
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

2
发表于 2014-11-2 08:34:16 | 只看该作者
https://rpg.blue/thread-306831-1-1.html

需要一定的脚本知识

点评

感谢~、 虽然暂时还没解决,但应该可以搞定。 @VIPArcher 麻烦版主结下贴。  发表于 2014-11-2 22:07

评分

参与人数 1梦石 +1 收起 理由
VIPArcher + 1 直接把画面数据复制到 Bitmap 实例的内存区.

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
173
在线时间
179 小时
注册时间
2011-4-16
帖子
63
3
 楼主| 发表于 2014-11-3 00:32:24 | 只看该作者


@taroxd @VIPArcher  再麻烦大触帮我看看我改的代码问题出在哪里好嘛?
如图,我点“新的冒险”后,播放动画的类是加载到了,但是Title 的窗口并没有关闭,动画是直接覆盖在Title界面播放的。。。代码在下面,有劳大触过目。
  1. class Scene_Title < Scene_Base
  2.   # ● 指令“新的冒险”
  3.   def command_new_game
  4.     DataManager.setup_new_game
  5.     close_command_window
  6.     $game_map.autoplay
  7.     SceneManager.goto(Scene_Map)
  8.     # ● 播放过场动画
  9.     SIN::PLAYER.play("Movies/Thinking.avi")
  10.     SIN::PLAYER.z = 50
  11.     @spt1 = Sprite.new
  12.     @spt1.bitmap = Bitmap.new(640, 640)
  13.     @spt1.bitmap.font.size = 36
  14.     @spt1.bitmap.font.shadow = true
  15.     @spt1.bitmap.font.outline = false
  16.     @spt1.z = 100
  17.     @spt2 = Sprite.new
  18.     @spt2.bitmap = Bitmap.new(640, 640)
  19.     @spt2.bitmap.g_fill_rect(@spt2.bitmap.rect, 0xffff0000, 0xff0000ff)
  20.     @spt2.visible = false
  21.     @spt2.z = 0
  22.     def show_msg(argh)
  23.       return @spt1.bitmap.clear if argh[:clear]
  24.       x = argh[:x].nil? ? 0 : argh[:x]
  25.       y = argh[:y].nil? ? 0 : argh[:y]
  26.       width = argh[:width].nil? ? 640 : argh[:width]
  27.       height = argh[:height].nil? ? 640 : argh[:height]
  28.       y = (Graphics.height - height) / 2 if y == :middle
  29.       str = argh[:str].nil? ? "" : argh[:str]
  30.       align = argh[:align].nil? ? 0 : argh[:align]
  31.       align = 0 if align == :left
  32.       align = 1 if align == :middle
  33.       align = 2 if align == :right
  34.       @spt1.bitmap.draw_text(x, y, width, height, str, align)
  35.     end
  36.     [url=home.php?mod=space&uid=2129346]@step[/url] = 0
  37.     [url=home.php?mod=space&uid=36110]@Wait[/url] = 15
  38.     @rotating = false
  39.     while true
  40.       Graphics.update
  41.       Input.update
  42.       SIN::PLAYER.update
  43.       SIN::PLAYER.replay_at_finish
  44.       @spt1.update
  45.       SIN::PLAYER.angle += 1 if @rotating
  46.       if Input.trigger?(:C) && @wait == -7
  47.         show_msg({ :clear => true })
  48.         case @step
  49.         when 16
  50.           rate = 255 / 60
  51.           90.times do |i|
  52.             Graphics.update
  53.             SIN::PLAYER.update
  54.             SIN::PLAYER.opacity -= rate
  55.           end
  56.           SIN::PLAYER.stop
  57.           break
  58.         end
  59.         @step += 1
  60.         @wait = 30
  61.       end
  62.       next if @wait == -7
  63.       if @wait.zero?
  64.         case @step
  65.         when 0
  66.           show_msg({  :height => 750,
  67.                       :str    => "  欢迎光临宇峰城网吧,首先这只是一个私人游戏。             "
  68.                     })
  69.         when 1
  70.           show_msg({  :height => 750,
  71.                       :str    => "  不管你怎么想,请以娱乐的心态来看待就对了。               "
  72.                     })
  73.         when 2
  74.           show_msg({  :height => 750,
  75.                       :str    => "  然后,说一些题外话。。。                                "
  76.                     })
  77.         when 3
  78.           show_msg({  :height => 750,
  79.                       :str    => "  我们无法左右社会局势的进展,对当下社会的种种亦是无可奈何,"
  80.                     })
  81.         when 4
  82.           show_msg({  :height => 750,
  83.                       :str    => "  但对于一些冷漠的事件,我们绝不仅仅是无关的旁观者,       "
  84.                     })
  85.         when 5
  86.           show_msg({  :height => 750,
  87.                       :str    => "  因为我们身在其中。 是每一个看似微不足道的个体,          "
  88.                     })
  89.         when 6
  90.           show_msg({  :height => 750,
  91.                       :str    => "  聚集在一起后才组成了这个现实社会。                      "
  92.                     })
  93.         when 7
  94.           show_msg({  :height => 750,
  95.                       :str    => "  我们需要思考,自主思考是完全不需要专业知识就能够做到的, "
  96.                     })
  97.         when 8
  98.           show_msg({  :height => 750,
  99.                       :str    => "  每一个个体与生俱来了这种思考的能力。                    "
  100.                     })
  101.         when 9
  102.           show_msg({  :height => 750,
  103.                       :str    => "  我们为什么需要思考?当然是为了分辨事物的真善美对错,     "
  104.                     })
  105.         when 10
  106.           show_msg({  :height => 750,
  107.                       :str    => "  促成自己的个性,完善道德论。那么什么是道德论呢?         "
  108.                     })
  109.         when 11
  110.           show_msg({  :height => 750,
  111.                       :str    => "  每个人内心深处或者说脑海里都存在着这么一本道德论,       "
  112.                     })
  113.         when 12
  114.           show_msg({  :height => 750,
  115.                       :str    => "  它是人与人之间所依仗的道德观念,用以判断、决策等等。     "
  116.                     })
  117.         when 13
  118.           show_msg({  :height => 750,
  119.                       :str    => "  它会随着个体经历的环境变迁而改变,                      "
  120.                     })
  121.         when 14
  122.           show_msg({  :height => 750,
  123.                       :str    => "  它是作为一个智能生命体必须具备的基本条件。。。           "
  124.                     })
  125.         when 15
  126.           show_msg({  :height => 750,
  127.                       :str    => "  汉娜阿伦特:平庸之恶,唯有思考方能克服!                 "
  128.                     })
  129.         when 16
  130.           show_msg({  :height => 750,
  131.                       :str    => "空格键跳过动画",
  132.                       :width  => 530,
  133.                       :align  => :middle
  134.                     })
  135.         end
  136.         @wait = -7
  137.         next
  138.         end
  139.       @wait -= 1
  140.       end
  141.   end
  142. end
复制代码

点评

我把视频尺寸稍微改了下,勉强遮挡住窗体,也算是解决了问题吧,哎。 @VIPArcher 麻烦版主结下帖  发表于 2014-11-3 06:10
汉化工作不定期更新中...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-4-29 06:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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