RPG里的地图随人物移动
点击次数:30 次 发布日期:2008-11-29 18:04:23 作者:源代码网
点击浏览该文件onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { if (_x>100) { this._x -= 2; } else { _root.map._x += 2; } } if (Key.isDown(Key.RIGHT)) { if (_x<400) { this._x += 2; } else { _root.map._x -= 2; } } if (Key.isDown(Key.UP)) { if (_y>100) { this._y -= 2; } else { _root.map._y += 2; } } if (Key.isDown(Key.DOWN)) { if (_y<400) { this._y += 2; } else { _root.map._y -= 2; } } } 点击浏览该文件 点击浏览该文件elfsoil 点击浏览该文件 点击浏览该文件这个是最简单的方法了,直接把障碍放在地图这个MC里面; 还有一种方法看这个fla吧: 源代码网供稿. |

点击浏览该文件
点击浏览该文件