摘要: 动画模拟主要效果就是鼠标点击地图,人物会在地图上行走。主要代码 关于移动还是用到了向量(Vector)的概念 判断移动方向代码,根据方向来选择走路效果需要用到的图片 direction: function(pos, target) { var z = Math.abs(target.x - pos.x); if (target.x > pos.x) { if (target.y >= pos.y - z && target.y <= pos... 阅读全文
posted @ 2012-04-10 23:28 忧忧夏天 阅读(1922) 评论(12) 推荐(5) 编辑