赞 | 10 |
VIP | 40 |
好人卡 | 0 |
积分 | 4 |
经验 | 6245 |
最后登录 | 2023-7-11 |
在线时间 | 235 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 382
- 在线时间
- 235 小时
- 注册时间
- 2009-2-13
- 帖子
- 470
|
这个……
ARPG_Actor里面33行注释掉
再把61……103注释掉即可
图:
代码:- #==============================================================================
- class ARPG_Actor
- #--------------------------------------------------------------------------
- # ● 初始化对象
- #--------------------------------------------------------------------------
- def initialize
- @actor = $game_party.actors[0]
- @hp = $game_party.actors[0].hp
- @sp = $game_party.actors[0].sp
- @exp = $game_party.actors[0].now_exp
- @states = $game_party.actors[0].states
- @parameter = []
- #Mess_Text.visible = true
- #Mess_Text.ini
- steup
- end
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def steup
- # make_sprite
- if !$scene.is_a?(Scene_Key)
- @key_window = Window_KeyCommand.new
- @key_window.refresh($game_party.actors[0])
- end
- if !$scene.is_a?(Scene_Item_Key)
- @item_window = Window_Item_KeyCommand.new
- @item_window.refresh($game_party.actors[0])
- end
- end
- def visible=(val)
- @key_window.visible = val if !@key_window.nil?
- @item_window.visible = val if !@item_window.nil?
- @parameter.each{|pict|pict.visible = val}
- end
- #--------------------------------------------------------------------------
- # ● 释放
- #--------------------------------------------------------------------------
- def dispose
- #Mess_Text.dispose
- #Mess_Text.visible = false
- @key_window.dispose if !@key_window.nil?
- @item_window.dispose if !@item_window.nil?
- @parameter.each{|pict|pict.dispose}
- end
- #--------------------------------------------------------------------------
- # ● 生成精灵的实例
- #--------------------------------------------------------------------------
- =begin
- def make_sprite
-
- @parameter[0] = Sprite.new
- @parameter[0].bitmap = Bitmap.new(100,100)
- @parameter[0].bitmap.blt(0,0,RPG::Cache.picture("l1"),Rect.new(0,0,150,120))
- @parameter[0].x = -10;@parameter[0].y = 10
-
- @parameter[1] = Sprite.new
- @parameter[1].bitmap = Bitmap.new(150,120)
- @parameter[1].bitmap.blt(0,0,RPG::Cache.picture("bar"),Rect.new(0,0,150,120))
-
- @parameter[2] = Sprite.new
- @parameter[2].bitmap = Bitmap.new(61,83)
- @parameter[2].bitmap.blt(0,0,RPG::Cache.picture("HP"),Rect.new(0,0,61,83))
- h = $game_party.actors[0].hp * 82 / $game_party.actors[0].maxhp
- @parameter[2].bitmap.blt(0,0,RPG::Cache.picture("HPoo"),Rect.new(0,0,61,82-h))
- @parameter[2].x = 37;@parameter[2].y = 36
-
- @parameter[3] = Sprite.new
- @parameter[3].bitmap = Bitmap.new(59,82)
- @parameter[3].bitmap.blt(0,0,RPG::Cache.picture("SP"),Rect.new(0,0,59,82))
- h = $game_party.actors[0].sp * 82 / $game_party.actors[0].maxsp
- @parameter[3].bitmap.blt(0,0,RPG::Cache.picture("SPoo"),Rect.new(0,0,59,82-h))
- @parameter[3].x = 64;@parameter[3].y = 36
-
- @parameter[4] = Sprite.new
- @parameter[4].bitmap = Bitmap.new(59,82)
- @parameter[4].bitmap.blt(0,0,RPG::Cache.picture("EXP"),Rect.new(0,0,59,82))
- h = $game_party.actors[0].now_exp * 82 / $game_party.actors[0].next_exp
- @parameter[4].bitmap.blt(0,0,RPG::Cache.picture("EXPoo"),Rect.new(0,0,59,82-h))
- @parameter[4].x = 88;@parameter[4].y = 36
-
- @parameter.each{|e|e.z += 1}
-
- @parameter[5] = Sprite.new
- @parameter[5].bitmap = Bitmap.new(128,32)
- @parameter[5].x = 128
- @parameter[5].y = 480 - 32
-
- draw_actor_state(@actor,0,0)
-
- @parameter.each{|e|e.z += 2}
- end
- #--------------------------------------------------------------------------
- # ● 描绘状态
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_state(actor, x, y, width = 120)
- pos = 0
- for i in @actor.states
- if $data_states[i].name == "战斗不能"
- next
- end
- bitmap = RPG::Cache.icon($data_states[i].name)
- @parameter[5].bitmap.blt(x+pos*bitmap.width, y, bitmap, Rect.new(0,0,bitmap.width,bitmap.height))
- pos += 1
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新数值变化
- #--------------------------------------------------------------------------
- def refresh(type)
- case type
- when 0
- @parameter[2].bitmap.clear
- @parameter[2].bitmap.blt(0,0,RPG::Cache.picture("HP"),Rect.new(0,0,61,83))
- h = @hp * 82 / $game_party.actors[0].maxhp
- @parameter[2].bitmap.blt(0,0,RPG::Cache.picture("HPoo"),Rect.new(0,0,61,82-h))
- return
- when 1
- @parameter[3].bitmap.clear
- @parameter[3].bitmap.blt(0,0,RPG::Cache.picture("SP"),Rect.new(0,0,59,82))
- h = @sp * 82 / $game_party.actors[0].maxsp
- @parameter[3].bitmap.blt(0,0,RPG::Cache.picture("SPoo"),Rect.new(0,0,59,82-h))
- return
- when 2
- @parameter[4].bitmap.clear
- @parameter[4].bitmap.blt(0,0,RPG::Cache.picture("EXP"),Rect.new(0,0,59,82))
- h = @exp * 82 / $game_party.actors[0].next_exp
- @parameter[4].bitmap.blt(0,0,RPG::Cache.picture("EXPoo"),Rect.new(0,0,59,82-h))
- return
- when 3
- @parameter[5].bitmap.clear
- draw_actor_state(@actor,0,0)
- @states = $game_party.actors[0].states
- return
- end
- end
-
- =end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def update
- Mess_Text.update
- if $refresh["states"]
- refresh(3)
- $refresh["states"] = false
- end
- if $refresh["item"]
- @item_window.refresh(@actor)
- $refresh["item"] = false
- end
- if $refresh["skill"]
- @key_window.refresh(@actor)
- $refresh["skill"] = false
- end
- if @actor.states.size > 0
- for i in @actor.states
- if @actor.states_time[i] > 0
- @actor.states_time[i] -= 1
- end
- if @actor.states_time[i] <= 0
- @actor.remove_state(i)
- end
- end
- if @actor.states.size > 0 and Graphics.frame_count%10 == 0
- $game_party.check_map_slip_damage
- end
- end
- if Input.trigger?(Input::CTRL)
- Mess_Text.clear
- return
- end
- if Input.trigger?(Input::SHIFT)
- Mess_Text.visible = !Mess_Text.visible
- return
- end
- if @hp != $game_party.actors[0].hp
- if @hp > $game_party.actors[0].hp
- @hp -= 1
- end
- if @hp < $game_party.actors[0].hp
- @hp += 1
- end
- refresh(0)
- end
- if @sp != $game_party.actors[0].sp
- if @sp > $game_party.actors[0].sp
- @sp -= 1
- end
- if @sp < $game_party.actors[0].sp
- @sp += 1
- end
- refresh(1)
- end
- if @exp != $game_party.actors[0].now_exp
- if @exp > $game_party.actors[0].now_exp
- @exp -= 1
- end
- if @exp < $game_party.actors[0].now_exp
- @exp += 1
- end
- refresh(2)
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|