赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 284 |
最后登录 | 2018-9-22 |
在线时间 | 0 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 0 小时
- 注册时间
- 2008-1-9
- 帖子
- 118
|
7楼
楼主 |
发表于 2008-1-31 22:09:31
|
只看该作者
- CHENGE_KEY = Input::C
- #--------------------------------------------------------------------------
- # 游戏名(自定义)
- #--------------------------------------------------------------------------
- CHARA_AGE = [""]
- #--------------------------------------------------------------------------
- #游戏作者(自定义)
- #--------------------------------------------------------------------------
- CHARA_FROM = [""]
- #--------------------------------------------------------------------------
- # 游戏版本(自定义)
- #--------------------------------------------------------------------------
- CHARA_H = [""]
- #--------------------------------------------------------------------------
- # 制作软件(自定义)
- #--------------------------------------------------------------------------
- CHARA_W = ["60"]
- #--------------------------------------------------------------------------
- # 具体介绍(自定义)
- #--------------------------------------------------------------------------
- # 人物1号介绍
- L1 = "RPG制作大师XP的标准主人公+形象代言人"
- L2 = "是一个外表不经世事、内心坚强无比的小伙子"
- L3 = ""
- L_SET1 = [L1, L2, L3]
- CHARA_INFO = [L_SET1]
- #==============================================================================
- # Window_Charactor
- #==============================================================================
- class Window_Charactor < Window_Base
- #--------------------------------------------------------------------------
- # actor : 初始化的角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_battler_graphics(@actor, 100, 200)
- self.contents.font.color.set(255, 255,50)
- self.contents.draw_text(250, 10, 80, 32, "游戏名")
- self.contents.draw_text(250, 40, 80, 32, "游戏作者")
- self.contents.draw_text(250, 70, 80, 32, "游戏版本")
- self.contents.draw_text(250, 100, 80, 32, "制作软件")
- self.contents.font.color = normal_color
- draw_actor_name(@actor, 350, 10)
- draw_actor_age(@actor, 350, 50)
- draw_actor_from(@actor, 350, 90)
- draw_actor_height(@actor, 350, 130)
- draw_actor_weight(@actor, 350, 170)
- draw_actor_other(@actor, 50, 250)
- end
- end
- class Window_Base < Window
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_battler_graphics(actor, x, y)
- battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue)
- w = battler.width
- h = battler.height
- self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h))
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_age(actor, x, y)
- self.contents.draw_text(x, y, 80, 32, CHARA_AGE[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_from(actor, x, y)
- self.contents.draw_text(x, y, 180, 32, CHARA_FROM[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_height(actor, x, y)
- self.contents.draw_text(x, y , 200, 32, CHARA_H[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_weight(actor, x, y)
- self.contents.draw_text(x, y, 250, 32, CHARA_W[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_other(actor, x, y)
- info = CHARA_INFO[actor.id-1]
- for i in 0...info.size
- self.contents.draw_text(x, y+32*i, 600, 32, info[i])
- end
- end
- end
- #==============================================================================
- # Scene_Charactor
- #==============================================================================
- class Scene_Charactor
- #--------------------------------------------------------------------------
- # actor_index :角色编号
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0, equip_index = 0)
- @actor_index = actor_index
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def main
- @actor = $game_party.actors[@actor_index]
- @status_window = Window_Charactor.new(@actor)
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @status_window.dispose
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def update
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Menu.new(3)
- return
- end
- if Input.trigger?(Input::R)
- $game_system.se_play($data_system.cursor_se)
- @actor_index += 1
- @actor_index %= $game_party.actors.size
- $scene = Scene_Charactor.new(@actor_index)
- return
- end
- if Input.trigger?(Input::L)
- $game_system.se_play($data_system.cursor_se)
- @actor_index += $game_party.actors.size - 1
- @actor_index %= $game_party.actors.size
- $scene = Scene_Charactor.new(@actor_index)
- return
- end
- end
- end
- #==============================================================================
- # Scene_Status
- #==============================================================================
- class Scene_Status
- alias update_chara update
- def update
- if Input.trigger?(CHENGE_KEY)
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Charactor.new(@actor_index)
- return
- end
- update_chara
- end
- end
复制代码
这段脚本放哪? |
|