Project1
标题:
在脚本中使用像素图(pixel map,并非bitmap)
[打印本页]
作者:
晴兰
时间:
2014-9-1 02:19
提示:
作者被禁止或删除 内容自动屏蔽
作者:
紫英晓狼1130
时间:
2014-9-1 06:02
可以尝试一下用其描绘满屏画面,看看执行效率= =
作者:
余烬之中
时间:
2014-9-6 22:05
s = Sprite.new
s.bitmap = Bitmap.new Graphics.width, Graphics.height
s.bitmap.fill_rect s.bitmap.rect, Color.new(255, 255, 255, 255)
x = Bitmap.pixelMap "." => Color.new(255, 155, 225, 255) do
",...,,,.,,.,,,.,.,.,,.,.,".each_char.each_slice(5).map{|t|t.join}.join "\n"
end
s.bitmap.blt 1, 1, x, x.rect
s.zoom_x = s.zoom_y = 50
[Graphics, Input, s].each &:update until false
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1