| 赞 | 425 |
| VIP | |
| 好人卡 | |
| 积分 | 422 |
| 经验 | |
| 最后登录 | 2026-8-20 |
| 在线时间 | 6017 小时 |
- 梦石
- 0
- 星屑
- 42235
- 在线时间
- 6017 小时
- 注册时间
- 2006-11-10
- 回帖
- 6966
|
发表于 2019-4-18 16:55:20
|
显示全部楼层
本帖最后由 灯笼菜刀王 于 2019-4-18 19:07 编辑
测试了下, 你把 bitmap.hue_change(100) 这句写到UPDATE里就会变, 每描绘一次, 它就会以上次的色相基础上再次转换色相
不要把它放UPDATE就没事了
这样写,update的时候 不会改变色相
- class Win_a < Window_Base
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- @bitmap = RPG::Cache.picture("G/01")
- @bitmap.hue_change(100)
- self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, 640, 480))
- end
- def update
- if Input.trigger?(Input::UP)
- self.contents.clear
- self.contents.blt(0, -240, @bitmap, Rect.new(0, 0, 640, 480))
- end
- if Input.trigger?(Input::DOWN)
- self.contents.clear
- self.contents.blt(0, 240, @bitmap, Rect.new(0, 0, 640, 480))
- end
- end
- end
复制代码
这样写每描绘一次就会在上次的基础上转变色相
- class Win_a < Window_Base
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- bitmap = RPG::Cache.picture("G/01")
- bitmap.hue_change(100)
- self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 640, 480))
- end
- def update
- if Input.trigger?(Input::UP)
- self.contents.clear
- bitmap = RPG::Cache.picture("G/01")
- bitmap.hue_change(100)
- self.contents.blt(0, -240, bitmap, Rect.new(0, 0, 640, 480))
- end
- if Input.trigger?(Input::DOWN)
- self.contents.clear
- bitmap = RPG::Cache.picture("G/01")
- bitmap.hue_change(100)
- self.contents.blt(0, 240, bitmap, Rect.new(0, 0, 640, 480))
- end
- end
- end
复制代码
非要在UPDATE里 加载 bitmap, 就换别的文件夹吧, bitmap = RPG::Cache.battler(name,hue) 这样就随便你刷新了
|
|