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

Project1

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

[已经解决] 跟各位大大要个窗口小脚本 2V

 关闭 [复制链接]

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
554
在线时间
1243 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

1
发表于 2009-6-8 21:03:21 | 显示全部楼层
这是核心
  1. class Window_V2sam < Window_Base
  2.   def initialize(skin = nil)
  3.     super(10,10,100,60)
  4.     change_skin(skin) if skin
  5.     update
  6.     $v2sam = self
  7.   end
  8.   #这个是改变皮肤
  9.   def change_skin(skin = "Window")
  10.     self.windowskin = Cache.system(skin)
  11.   end
  12.   #描绘
  13.   def refresh
  14.     return if @id == $game_actors[1].weapon_id
  15.     @id = $game_actors[1].weapon_id
  16.     self.contents.clear
  17.     draw_icon($data_weapons[$game_actors[1].weapon_id].icon_index, 0, 0) unless @id.zero?
  18.   end
  19. end
复制代码

然后,没明白【在场景画面显示】是什么意思……在需要调用的地方加Window_V2sam.new(皮肤文件名)吧

然后,当打开菜单,或者出现战斗的时候,是否需要隐藏窗口?
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上
回复 支持 反对

使用道具 举报

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
554
在线时间
1243 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

2
发表于 2009-6-10 01:57:37 | 显示全部楼层
  1. #==============================================================================
  2. # ■ v2sam的小窗口
  3. #------------------------------------------------------------------------------
  4. #  Skin:皮肤
  5. #   Swith:开关
  6. #   默认只在双刀流的时候显示左手武器,如果需要显示盾牌把24行的and及后面的删掉
  7. #==============================================================================
  8. class Window_V2sam < Window_Base
  9.   Swich = 10
  10.   Skin = "Window"
  11.   def initialize
  12.     super(10,10,100,60)
  13.     self.windowskin = Cache.system(Skin)
  14.     @actor = $game_actors[1]
  15.     refresh
  16.   end
  17.   def refresh
  18.     self.visible = $game_switches[Swich]
  19.     return if @id == @actor.weapon_id
  20.     @id0 = @actor.weapon_id
  21.     @id1 = @actor.armor1_id
  22.     self.contents.clear
  23.     draw_icon($data_weapons[@id0].icon_index, 0, 0) if @id0 != 0
  24.     draw_icon($data_weapons[@id1].icon_index, 24,0) if @id1 != 0 and @actor.two_swords_style
  25.   end
  26. end


  27. #自动刷新
  28. class Game_Map
  29.   alias refresh_v2sam refresh
  30.   def refresh
  31.     refresh_v2sam
  32.     $v2sam.refresh if $v2sam and !$v2sam.disposed?
  33.   end
  34. end

  35. #随地图场景生成和释放
  36. class Scene_Map < Scene_Base
  37.   alias start_v2sam start
  38.   def start
  39.     start_v2sam
  40.     $v2sam = Window_V2sam.new
  41.   end
  42.   def pre_terminate
  43.     $v2sam.dispose
  44.   end
  45. end
复制代码

既然上面的已经成交了那么VIP给上面的吧……反正我要V也没啥用
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-14 11:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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