查看: 2943|回复: 2

[有事请教] Alpha ABS能不能改键的?

[复制链接]
梦石
0
星屑
108
在线时间
11 小时
注册时间
2017-11-29
回帖
12
发表于 2017-12-3 13:33:34 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
我不想用ASDF
梦石
0
星屑
22578
在线时间
2605 小时
注册时间
2015-7-4
回帖
917
发表于 2017-12-3 22:20:16 | 显示全部楼层
暂时没想去改动,你可以试下这三个地方:
        Input.KeyMapperPKD = {
                9: 'tab', //GP LB
                32: 'space', //GP RB
                49: '1',
                50: '2',
                51: '3',
                52: '4',
                53: '5',
                54: '6',
                55: '7',
                56: '8',
                65: 'a', //GP X
                68: 'd', //GP B
                83: 's', // GP A
                87: 'w', //GP Y
                120: 'x',
                122: 'z'
        }
这上面加入你要用的键码
                if(Input.isTriggered(IKey.W())) {
                        this.touchControlAt(1);
                        return;
                }
                if(Input.isTriggered(IKey.A())) {
                        this.touchControlAt(0);
                        return;
                }
                if(Input.isTriggered(IKey.D())) {
                        this.touchControlAt(3);
                        return;
                }
                if(Input.isTriggered(IKey.S())) {
                        this.touchControlAt(2);
                        return;
                }
这上下各四个更改你要用键名。
                IKey.W = function()
                {
                        if(Input.isGamepad())
                                return 'menu';
                        else
                                return 'w';
                }
                IKey.A = function()
                {
                        if(Input.isGamepad())
                                return 'shift';
                        else
                                return 'a';
                }
                IKey.S = function()
                {
                        if(Input.isGamepad())
                                return 'ok';
                        else
                                return 's';
                }
                IKey.D = function()
                {
                        if(Input.isGamepad())
                                return 'cancel';
                        else
                                return 'd';
                }
回复

使用道具 举报

梦石
0
星屑
108
在线时间
11 小时
注册时间
2017-11-29
回帖
12
 楼主| 发表于 2017-12-4 11:17:20 | 显示全部楼层
Fan723 发表于 2017-12-3 22:20
暂时没想去改动,你可以试下这三个地方:
        Input.KeyMapperPKD = {
                9: 'tab', //GP LB

好的 谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部