赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 10095 |
最后登录 | 2014-8-13 |
在线时间 | 327 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 327 小时
- 注册时间
- 2011-3-2
- 帖子
- 287
|
6楼

楼主 |
发表于 2011-3-2 09:48:06
|
只看该作者
本帖最后由 老邢 于 2011-3-2 09:54 编辑
ruby的确比lua舒服,如果不是因为iphone不支持ruby,我也不会从头学lua。当我想像自己的rm制作完成,有宠物,有坐骑,有纸娃娃,可以联网。。。恒心就像恒星那么大,哈哈
老邢于2011-3-2 09:50补充以下内容:
最后一个隐藏对象window已经完成,正是进入Scripts的翻译工作。
贴一大段代码show一下- function MainImpl()
- local reload = false
-
- local x, y = 0, 0
-
-
- local plant = Plant.new()
- plant.bitmap = Bitmap.new("Graphics/Parallaxes/Sea")
- plant.zoom_x = 0.5
- plant.zoom_y = 0.5
- plant.ox = 20
- plant.oy = 50
- local spr1 = Sprite.new()
- spr1.bitmap = Bitmap.new("Graphics/Characters/Actor1")
- spr1.x = 190
- spr1.y = 0
- spr1.src_rect = Rect.new(0, 0, 32, 32)
- --[[
- local map = Tilemap.new()
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileA1"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileA2"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileA3"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileA4"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileA5"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileB"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileC"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileD"))
- table.insert(map.bitmaps, Bitmap.new("Graphics/System/TileE"))
- map.map_data = Table.new(24, 24, 1)
- for y = 0, 23 do
- for x = 0, 23 do
- map.map_data:set(x, y, 0, 2048 + 80 * 48 + y * 24 + x + 7 * 48)
- end
- end
- map.ox = 20
- map.oy = 20
- --]]
- wnd = Window.new()
- wnd.windowskin = Bitmap.new("Graphics/System/Window")
- wnd.x = 20
- wnd.y = 20
- wnd.width = 400
- wnd.height = 200
-
- while true do
- _Input.update()
- spr1.x = x
- spr1.y = y
- spr1:update()
- -- map:update()
- if wnd.openness < 255 then
- wnd.openness = wnd.openness + 5
- end
- Graphics.update()
- end
-
- return reload
- end
复制代码 |
|