赞 | 3 |
VIP | 333 |
好人卡 | 2 |
积分 | 1 |
经验 | 1450446 |
最后登录 | 2019-5-29 |
在线时间 | 615 小时 |
Lv1.梦旅人 66RPG站长
- 梦石
- 0
- 星屑
- 54
- 在线时间
- 615 小时
- 注册时间
- 2005-10-10
- 帖子
- 5734
|
有一点点小BUG,修正了一下:
- $defaultfonttype = "黑体"
- $defaultfontsize = 18
- # 补一句:153、152行是描绘行走图的。把153注释掉,152去掉注释,可以绘制头像(chatacters/Faces/人名.png)
- #==============================================================================# ** Scene_Status
- #------------------------------------------------------------------------------
- # This class performs status screen processing.
- # Version 1.05
- # Made by: Emilio Islas or Illusion Gaming
- #==============================================================================
- class Scene_Status
- #--------------------------------------------------------------------------
- # * Object Initialization
- # actor_index : actor index
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0, equip_index = 0)
- @actor_index = actor_index
- end
- #--------------------------------------------------------------------------
- # * Main Processing
- #--------------------------------------------------------------------------
- def main
- # Get actor
- @actor = $game_party.actors[@actor_index]
-
- # Make status window
- @window1 = Window1.new
- @window1.x =0
- @window1.y =0
- @window1.height = 60
- @window1.width = 640
-
- @Window_Player = Window_Player.new(@actor)
- @Window_Player.x =0
- @Window_Player.y =60
- @Window_Player.height = 420
- @Window_Player.width = 640
-
- @Window_Status = Window_Status.new(@actor)
- @Window_Status.x =0
- @Window_Status.y =170
- @Window_Status.height = 310
- @Window_Status.width = 280
-
- @Window_Exp = Window_Exp.new(@actor)
- @Window_Exp.x =280
- @Window_Exp.y =170
- @Window_Exp.height = 75
- @Window_Exp.width = 360
-
- @Window_Equipment = Window_Equipment.new(@actor)
- @Window_Equipment.x =280
- @Window_Equipment.y =245
- @Window_Equipment.height = 235
- @Window_Equipment.width = 360
- # Execute transition
- Graphics.transition
- # Main loop
- loop do
- # Update game screen
- Graphics.update
- # Update input information
- Input.update
- # Frame update
- update
- # Abort loop if screen is changed
- if $scene != self
- break
- end
- end
-
- # Prepare for transition
- Graphics.freeze
- # Dispose of windows
- @window1.dispose
- @Window_Player.dispose
- @Window_Status.dispose
- @Window_Exp.dispose
- @Window_Equipment.dispose
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- # If B button was pressed
- if Input.trigger?(Input::B)
- # Play cancel SE
- $game_system.se_play($data_system.cancel_se)
- # Switch to menu screen
- $scene = Scene_Menu.new(3)
- return
- end
-
- # If R button was pressed
- if Input.trigger?(Input::RIGHT)
- # Play cursor SE
- $game_system.se_play($data_system.cursor_se)
- # To next actor
- @actor_index += 1
- @actor_index %= $game_party.actors.size
- # Switch to different status screen
- $scene = Scene_Status.new(@actor_index)
- return
- end
- # If L button was pressed
- if Input.trigger?(Input::LEFT)
- # Play cursor SE
- $game_system.se_play($data_system.cursor_se)
- # To previous actor
- @actor_index += $game_party.actors.size - 1
- @actor_index %= $game_party.actors.size
- # Switch to different status screen
- $scene = Scene_Status.new(@actor_index)
- return
- end
- end
- end
- class Window1 < Window_Base
- def initialize
- super(0, 0, 640,60)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = $defaultfonttype
- self.contents.font.size = $defaultfontsize
- self.contents.font.color = text_color(0)
- self.contents.draw_text(0, 0, 130, 33, "< Prev Player")
- self.contents.draw_text(500, 0, 110, 33, "Next Player >")
- end
- end
- class Window_Base < Window
- def draw_actor_face(actor, x, y)
- face = RPG::Cache.character("Faces/" + actor.name, actor.character_hue)
- fw = face.width
- fh = face.height
- src_rect = Rect.new(0, 0, fw, fh)
- self.contents.blt(x - fw / 23, y - fh, face, src_rect)
- end
- end
- class Window_Player < Window_Base
- def initialize(actor)
- super(0, 0, 640,420)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- self.contents.font.name = $defaultfonttype
- self.contents.font.size = $defaultfontsize
- self.contents.font.color = text_color(0)
- x = 94
- y = -5
- #draw_actor_face(actor, 11, y + 90)
- draw_actor_graphic(actor,x-50,y+80)
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 78, y)
- draw_actor_level(actor, x, y + 18)
- draw_actor_state(actor, x + 144, y)
- draw_actor_hp(actor, x, y + 38)
- draw_actor_sp(actor, x, y + 58)
- end
- end
- class Window_Status < Window_Base
- def initialize(actor)
- super(0, 0, 280,310)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- self.contents.font.name = $defaultfonttype
- self.contents.font.size = $defaultfontsize
- self.contents.font.color = text_color(0)
- draw_actor_parameter(@actor, 0, 0, 0)
- draw_actor_parameter(@actor, 0, 32, 1)
- draw_actor_parameter(@actor, 0, 64, 2)
- draw_actor_parameter(@actor, 0, 96, 3)
- draw_actor_parameter(@actor, 0, 128, 4)
- draw_actor_parameter(@actor, 0, 160, 5)
- draw_actor_parameter(@actor, 0, 192, 6)
- end
- end
- class Window_Exp < Window_Base
- def initialize(actor)
- super(0, 0, 360,75)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- self.contents.font.name = $defaultfonttype
- self.contents.font.size = $defaultfontsize
- self.contents.font.color = text_color(0)
- self.contents.font.color = system_color
- self.contents.draw_text(0, -5, 75, 32, "EXP")
- self.contents.draw_text(0, 13, 75, 32, "NEXT")
- self.contents.font.color = normal_color
- self.contents.draw_text(0 + 80, -5, 75, 32, @actor.exp_s, 2)
- self.contents.draw_text(0 + 80, 13, 75, 32, @actor.next_rest_exp_s, 2)
- end
- end
- class Window_Equipment < Window_Base
- def initialize(actor)
- super(0, 0, 360,235)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- self.contents.font.name = $defaultfonttype
- self.contents.font.size = $defaultfontsize
- self.contents.font.color = text_color(0)
- self.contents.font.color = system_color
- self.contents.draw_text(0, 0, 96, 32, "Equipment")
- draw_item_name($data_weapons[@actor.weapon_id], 0 + 16, 48)
- draw_item_name($data_armors[@actor.armor1_id], 0 + 16, 80)
- draw_item_name($data_armors[@actor.armor2_id], 0 + 16, 112)
- draw_item_name($data_armors[@actor.armor3_id], 0 + 16, 144)
- draw_item_name($data_armors[@actor.armor4_id], 0 + 16, 176)
- end
- end
复制代码 |
|