Merge branch 'master' of git.kingsome.cn:weapp/emulator

This commit is contained in:
zhl 2019-03-06 20:03:59 +08:00
commit 5b06e51f5d

View File

@ -122,7 +122,14 @@ window.vm = {
},
onCtrlDire: function(t, e) {
this.onCtrlDire;
var i = Math.round((t + 180) / 45) % 8;
var i ;//= Math.round((t + 180) / 45) % 8;
var abst = Math.abs(t);
if((abst>=40&&abst<=50)||(abst>=130&&abst<=140)){
i = Math.round((t + 180) / 45) % 8;
}
else{
i = Math.round((t + 180) / 90) % 4*2;
}
this.oldDire != i && (e(i, t), this.oldDire = i)
},
simulateKeyPress: function(t, e) {