查看: 2115|回复: 0

[VIPArcher] 【菜单美化】——窗口滑动模板

[复制链接]

无限の剣制

梦石
0
星屑
10445
在线时间
5019 小时
注册时间
2013-2-28
回帖
4942

开拓者贵宾

发表于 2014-10-7 00:42:43 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 VIPArcher 于 2014-12-30 12:49 编辑

这里只是模板,其他窗口滑动还请自行编写。
附上原帖链接。[pre lang="ruby" line="1"]#==============================================================================
# ■ VA菜单滑动
#  创意:百页书香,铅笔描绘的思念
# By :VIPArcher
#  -- 本脚本来自 https://rpg.blue 使用或转载请保留以上信息。
#==============================================================================
# 这里只有默认的主菜单和物品栏,其他窗口也是同样的方法。
# 具体请自己设置。一点难度都没有,依葫芦画瓢就可以了。
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ● 开始后处理
  #--------------------------------------------------------------------------
  alias vip_slide_post_start post_start
  def post_start
    init_slide
    vip_slide_post_start
    slide_start
  end
  #--------------------------------------------------------------------------
  # ● 滑动前的准备
  #--------------------------------------------------------------------------
  def init_slide ;end
  #--------------------------------------------------------------------------
  # ● 窗口滑动处理
  #--------------------------------------------------------------------------
  def slide_start ;end
end
#==============================================================================
# ■ 上面部分最好不要动,新场景写在最下方
#==============================================================================
#==============================================================================
#  菜单画面
#==============================================================================
class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # ● 滑动前的准备
  # 重定义开始时各个窗口的位置(基本会设置到屏幕外),
  # 具体有哪些窗口去各个场景里面自己找。
  #--------------------------------------------------------------------------
  def init_slide
    @command_window.y -= 150
    @gold_window.x -= 100
    @status_window.x = 260
  end
  #--------------------------------------------------------------------------
  # ● 窗口滑动处理
  #--------------------------------------------------------------------------
  def slide_start
    10.times do
      @command_window.y += 15
      @gold_window.x    += 10
      @status_window.x  -= 10
                      # 每帧移动的坐标量
      Graphics.update # 刷新窗口
    end
    10.times{|i|
    @gold_window.x    += 5 * Math.cos(i)
    @command_window.y += 5 * Math.cos(i)
    Graphics.update}  # 弹动
  end
end
#==============================================================================
#  物品画面
#==============================================================================
class Scene_Item < Scene_ItemBase
  #--------------------------------------------------------------------------
  # ● 滑动前的准备
  #--------------------------------------------------------------------------
  def init_slide
    @category_window.x -= 100
    @item_window.y += 100
    @help_window.y -= 60
  end
  #--------------------------------------------------------------------------
  # ● 窗口滑动处理
  #--------------------------------------------------------------------------
  def slide_start
    10.times do
      @category_window.x += 10
      @item_window.y -= 10
      @help_window.y += 6
      # 每帧移动的坐标量
      Graphics.update # 刷新窗口
    end
  end
end
#==============================================================================
#  其他画面 泥自己写啦
#==============================================================================[/pre]

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本发帖返回顶部