赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 1 |
经验 | 1810 |
最后登录 | 2012-7-18 |
在线时间 | 18 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 18 小时
- 注册时间
- 2009-7-25
- 帖子
- 411
|
6楼
楼主 |
发表于 2009-8-30 13:06:58
|
只看该作者
本帖最后由 flzt5354 于 2009-8-30 13:12 编辑
- -、
新建到轩辕剑菜单的装备选项。作描述能力值
- -我建了是没问题了。。。
问题是不会释放。。。一直存在
郁闷- class Window_nengli < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 480, 250)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- @color_box = [0,0,0]
- end
-
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
-
- def refresh
-
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- x = 64
- y = i * 80
- actor = $game_party.actors[i]
- # bitmap = Bitmap.new("Graphics/system/menu/headp/" + actor.name + ".png")
- # src_rect = Rect.new(5, 13, 42, 100)
- # self.contents.blt(x - 64, y + 10, bitmap, src_rect)
- # self.draw_actor_state(actor, x +4, y+53)
- # 我全写成散的! =。=
- self.contents.font.color = Color.new(255, 0, 0, 255)
- self.contents.font.size = 18
- self.contents.font.bold = true
- self.contents.draw_text(x - 67, y + 17, 44, 32, "攻击")
- self.contents.font.color = Color.new(0, 96, 255, 255)
- self.contents.draw_text(x - 67, y + 17 + 17, 44, 32, "物防")
- self.contents.font.color = Color.new(0, 255, 0, 255)
- self.contents.draw_text(x - 67, y + 17 + 17 + 17, 44, 32, "魔防")
- self.contents.font.bold = false
- self.contents.font.color = normal_color
- self.contents.font.size = 20
- self.contents.draw_text(x - 30, y, 160, 32, actor.name)
- self.contents.font.size = 20
- self.contents.draw_text(x-28, y + 17, 36, 32, actor.atk.to_s, 2)
- self.contents.draw_text(x-28, y + 17 + 17, 36, 32, actor.pdef.to_s, 2)
- self.contents.draw_text(x-28, y + 17 + 17 + 17, 36, 32, actor.mdef.to_s, 2)
- if @actor_index == i
- if @new_atk != nil
- @color_box[0] = @new_atk <=> actor.atk
- self.contents.font.size = 20
- self.contents.font.color = Color.new(0, 0, 0, 255)
- self.contents.draw_text(x, y + 17, 40, 32, "→", 1)
- self.contents.font.size = 16
- self.contents.font.color = @color_box[0] == -1 ? Color.new(0,255,0) : (@color_box[0] == 1 ? Color.new(255,0,0) : normal_color)
- self.contents.draw_text(x+24, y + 17, 36, 32, @new_atk.to_s, 2)
- end
- if @new_pdef != nil
- @color_box[1] = @new_pdef <=> actor.pdef
- self.contents.font.size = 20
- self.contents.font.color = Color.new(0, 0, 0, 255)
- self.contents.draw_text(x, y + 17 + 17, 40, 32, "→", 1)
- self.contents.font.size = 16
- self.contents.font.color = @color_box[1] == -1 ? Color.new(0,255,0) : (@color_box[1] == 1 ? Color.new(255,0,0) : normal_color)
- self.contents.draw_text(x+24, y + 17 + 17, 36, 32, @new_pdef.to_s, 2)
- end
- if @new_mdef != nil
- @color_box[2] = @new_mdef <=> actor.mdef
- self.contents.font.size = 20
- self.contents.font.color = Color.new(0, 0, 0, 255)
- self.contents.draw_text(x, y + 17 + 17 + 17, 40, 32, "→", 1)
- self.contents.font.size = 16
- self.contents.font.color = @color_box[2] == -1 ? Color.new(0,255,0) : (@color_box[2] == 1 ? Color.new(255,0,0) : normal_color)
- self.contents.draw_text(x+24, y + 17 + 17 + 17, 36, 32, @new_mdef.to_s, 2)
- end
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 变更装备后的能力值设置
- # new_atk : 变更装备后的攻击力
- # new_pdef : 变更装备后的物理防御
- # new_mdef : 变更装备后的魔法防御
- #--------------------------------------------------------------------------
- def set_new_parameters(new_atk, new_pdef, new_mdef)
- if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
- @new_atk = new_atk
- @new_pdef = new_pdef
- @new_mdef = new_mdef
- refresh
- end
- end
- end
复制代码 在主菜单中Scene_Menu
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 命令窗口的光标位置分支
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
@equip_index = 0
@actor = $game_party.actors[@status_window1.index]
@equip_help_window = Window_Help_New.new
@equip_help_window.x = 137
@equip_help_window.y = 480 - 64 - 32 - 8
@equip_right_window = Window_EquipRight_New.new(@actor)
@equip_item_window1 = Window_EquipItem_New.new(@actor, 0)
@equip_item_window2 = Window_EquipItem_New.new(@actor, 1)
@equip_item_window3 = Window_EquipItem_New.new(@actor, 2)
@equip_item_window4 = Window_EquipItem_New.new(@actor, 3)
@equip_item_window5 = Window_EquipItem_New.new(@actor, 4)
@equip_item_window6 = Window_EquipItem_New.new(@actor, 5)
@equip_item_window7 = Window_EquipItem_New.new(@actor, 6)
@equip_item_window8 = Window_EquipItem_New.new(@actor, 7)
#........................................................................
@equip_window = Window_Equip.new
@equip_window.y = 394
@equip_window.set_item_id
#........................................................................
#################
@nengli_window = Window_nengli.new
#######################
# 关联帮助窗口
- -在这插入了
、、但是却不知道在哪释放 |
|