赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 13512 |
最后登录 | 2022-5-16 |
在线时间 | 140 小时 |
Lv1.梦旅人 茄孓
- 梦石
- 0
- 星屑
- 72
- 在线时间
- 140 小时
- 注册时间
- 2007-5-29
- 帖子
- 956
|
- class Window_Exp < Window_Base
- def initialize
- super(0, 0, 160, 64)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- end
- def refresh
- self.contents.clear
- for i in 0...$game_party.actors.size
- x = 64
- y = i * 116
- actor = $game_party.actors[1]
- exp(actor,0,0)
- end
- end
- def exp(actor,x,y)
- self.contents.fill_rect(x,y,96,16,Color.new(255,255,255,255))
- self.contents.fill_rect(x+1,y+1,94,14,Color.new(0,0,0,255))
- w = 94*$game_actors[1].now_exp/$game_actors[1].next_exp
- self.contents.fill_rect(x+1,y+1,w,14,Color.new(50,255,50,255))
- end
- end
- class Scene_Map
- def initialize
- @o_exp = $game_actors[1].exp
- end
- alias old_main main
- def main
- @exp = Window_Exp.new
- @exp.x = 0
- @exp.y = 0
- old_main
- @exp.dispose
- end
- alias old_update update
- def update
- if @o_exp != $game_actors[1].exp
- @o_exp = $game_actors[1].exp
- @exp.refresh
- else
- @exp.update
- end
- old_update
- end
- end
- class Game_Actor
- def now_exp
- return @exp - @exp_list[@level]
- end
- def next_exp
- return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
- end
- end
复制代码
这个是我自己工程里弄一段下来给你参考的
直接把脚本复制放到main前就可以``
就是经验条了`
自己可以修改添加 |
|