发新话题
打印

关于横版游戏的多个问题?

关于横版游戏的多个问题?

1.在横版游戏人物的跑动的代码应该怎么写呢?比如:街机游戏恐龙新世纪中人物理的跑动用代码怎么实现呢?

2.关于出招问题:当按下出招键时如:M  时主角会发轻拳,当不停的按时主角会出轻拳,重拳,重脚这样的顺序出招呢?
我的小站
www.taotaoyx.cn

TOP

写在人物上

onClipEvent (enterFrame) {

if (Key.isDown(Key.LEFT)) {

if (this._x>80) {
this._x -= 10;
}
else {

_root.map._x += 10;

}
}
if (Key.isDown(Key.RIGHT)) {
if (this._x<480) {
this._x += 10;
} else if (this._x<600){
_root.map._x -= 10;
}
}
if (Key.isDown(Key.UP)) {

_root.player._y -= 10;

}
if (Key.isDown(Key.DOWN)) {
_root.player._y += 10;
}
}

TOP

比如:快速按前进时会变成跑这种效果而不是人物的移动
我的小站
www.taotaoyx.cn

TOP

路过

TOP

引用:
原帖由 CEV3 于 2008-5-23 19:13 发表
onClipEvent (enterFrame) {

if (Key.isDown(Key.LEFT)) {

if (this._x>80) {
this._x -= 10;
}
else {

_root.map._x += 10;

}
}
if (Key.isDown(Key.RIGHT)) {
if (this._x
3.0时代了,这样的东西拿不出手啊

TOP

额!
没人帮忙
自己顶起来
我的小站
www.taotaoyx.cn

TOP

高薪诚聘!!!深圳市iLemon网络科技高薪诚聘WebGame程序开发人才加盟

提示: 作者被禁止或删除 内容自动屏蔽

TOP

发新话题