| 赞 | 153 |
| VIP | 10 |
| 好人卡 | 39 |
| 积分 | 93 |
| 经验 | 146191 |
| 最后登录 | 2024-5-6 |
| 在线时间 | 2504 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 9290
- 在线时间
- 2504 小时
- 注册时间
- 2011-5-20
- 帖子
- 15389

|
本帖最后由 chd114 于 2015-4-3 22:58 编辑
- s = Sprite.new
- s.bitmap = b = Bitmap.new(32, 32)
-
- b.fill_rect(0, 0, 32, 32, Color.new(255, 255, 255))
-
- loop do
- Input.update
-
- case Input.dir8
- when 1
- s.x += 32
- s.y += 32
- when 3
- s.x -= 32
- s.y += 32
- when 5
- s.x += 32
- s.y -= 32
- when 7
- s.x -= 32
- s.y -= 32
- when 2 then s.y += 32
- when 4 then s.x -= 32
- when 6 then s.x += 32
- when 8 then s.y -= 32
- end
-
- s.x %= Graphics.width
- s.y %= Graphics.height
-
- Graphics.update
- end
复制代码 八方向就这么干?@三途亚梦 @寒冷魔王 |
评分
-
查看全部评分
|