加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 飞翔的小鸟3 于 2017-10-21 23:31 编辑
用数组比较好像不行,a = "(255.000000,255.000000,255.000000,0.000000)"也不行,有办法吗?
class A def a @abc = Sprite.new @abc.bitmap = Bitmap.new("Graphics/weather/试验1.png") a = "(255.000000,255.000000,255.000000,0.000000)" b = @abc.bitmap.get_pixel(0,0) if a == b p 1 else p 2 end end end
class A
def a
@abc = Sprite.new
@abc.bitmap = Bitmap.new("Graphics/weather/试验1.png")
a = "(255.000000,255.000000,255.000000,0.000000)"
b = @abc.bitmap.get_pixel(0,0)
if a == b
p 1
else
p 2
end
end
end
|