class Bitmap
def inverse!
self.process_color do |a|
a.size.times do |i|
a[i].red = 255-a[i].red
a[i].green = 255-a[i].green
a[i].blue = 255-a[i].blue
end
end
end
def inverse
b = self.clone
b.inverse!
return b
end
end
class Scene_Battle
def inverse_color
@s = Sprite.new
@s.bitmap = Graphics.snap_to_bitmap
@s.bitmap = @s.bitmap.inverse
end
end
class Scene_Battle
def recover_color
@s.bitmap.dispose
end
end
# 调用方法-开启反色:SceneManager.scene.inverse_color
# 调用方法-关闭反色:SceneManager.scene.recover_color
class Bitmap
def inverse!
self.process_color do |a|
a.size.times do |i|
a[i].red = 255-a[i].red
a[i].green = 255-a[i].green
a[i].blue = 255-a[i].blue
end
end
end
def inverse
b = self.clone
b.inverse!
return b
end
end
class Scene_Battle
def inverse_color
@s = Sprite.new
@s.bitmap = Graphics.snap_to_bitmap
@s.bitmap = @s.bitmap.inverse
end
end
class Scene_Battle
def recover_color
@s.bitmap.dispose
end
end
# 调用方法-开启反色:SceneManager.scene.inverse_color
# 调用方法-关闭反色:SceneManager.scene.recover_color