mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 11:48:56 +00:00
Minor fix.
This commit is contained in:
parent
335fef66ef
commit
d21f59cafa
@ -440,7 +440,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
239.32248305180272,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -453,7 +453,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
239.32248305180272,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -6,6 +6,11 @@ window.ATK_CHARACTER_STATE = {
|
||||
Atk1: [2, "Atk1"],
|
||||
};
|
||||
|
||||
window.ATK_CHARACTER_STATE_ARR = [];
|
||||
for (let k in window.ATK_CHARACTER_STATE) {
|
||||
window.ATK_CHARACTER_STATE_ARR.push(window.ATK_CHARACTER_STATE[k]);
|
||||
}
|
||||
|
||||
cc.Class({
|
||||
extends: BaseCharacter,
|
||||
properties: {
|
||||
@ -44,17 +49,11 @@ cc.Class({
|
||||
}
|
||||
|
||||
if (newCharacterState != this.characterState) {
|
||||
switch (newCharacterState) {
|
||||
case ATK_CHARACTER_STATE.Idle1[0]:
|
||||
this.animComp.playAnimation(ATK_CHARACTER_STATE.Idle1[1]);
|
||||
break;
|
||||
case ATK_CHARACTER_STATE.Walking[0]:
|
||||
this.animComp.playAnimation(ATK_CHARACTER_STATE.Walking[1]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.characterState = newCharacterState;
|
||||
const newAnimName = window.ATK_CHARACTER_STATE_ARR[newCharacterState][1];
|
||||
if (newAnimName != this.animComp.animationName) {
|
||||
this.animComp.playAnimation(newAnimName);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -8,17 +8,13 @@ module.export = cc.Class({
|
||||
}
|
||||
},
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
start() {
|
||||
const self = this;
|
||||
self.activeDirection = {
|
||||
ctor() {
|
||||
this.activeDirection = {
|
||||
dx: 0,
|
||||
dy: 0
|
||||
};
|
||||
},
|
||||
|
||||
ctor() {},
|
||||
|
||||
onLoad() {
|
||||
const self = this;
|
||||
const canvasNode = self.mapNode.parent;
|
||||
|
@ -12,9 +12,6 @@ cc.Class({
|
||||
default: null
|
||||
}
|
||||
},
|
||||
start() {
|
||||
AttackingCharacter.prototype.start.call(this);
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
AttackingCharacter.prototype.onLoad.call(this);
|
||||
|
@ -976,14 +976,12 @@ cc.Class({
|
||||
const wpos = self.virtualGridToWorldPos(immediatePlayerInfo.virtualGridX, immediatePlayerInfo.virtualGridY);
|
||||
const dx = (wpos[0] - playerRichInfo.node.x);
|
||||
const dy = (wpos[1] - playerRichInfo.node.y);
|
||||
const justJiggling = (self.jigglingEps1D >= Math.abs(dx) && self.jigglingEps1D >= Math.abs(dy));
|
||||
//if (!justJiggling) {
|
||||
//const justJiggling = (self.jigglingEps1D >= Math.abs(dx) && self.jigglingEps1D >= Math.abs(dy));
|
||||
playerRichInfo.node.setPosition(wpos[0], wpos[1]);
|
||||
playerRichInfo.virtualGridX = immediatePlayerInfo.virtualGridX;
|
||||
playerRichInfo.virtualGridY = immediatePlayerInfo.virtualGridY;
|
||||
playerRichInfo.scriptIns.scheduleNewDirection(immediatePlayerInfo.dir, false);
|
||||
playerRichInfo.scriptIns.updateSpeed(immediatePlayerInfo.speed);
|
||||
//}
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -149,7 +149,7 @@ cc.Class({
|
||||
players: {
|
||||
10: {
|
||||
id: 10,
|
||||
joinIndex: 2,
|
||||
joinIndex: 1,
|
||||
virtualGridX: 0,
|
||||
virtualGridY: 0,
|
||||
speed: 2 * self.worldToVirtualGridRatio,
|
||||
|
Loading…
Reference in New Issue
Block a user