Added TurnAroundFramesToRecover.

This commit is contained in:
genxium
2023-01-19 09:20:52 +08:00
parent a82a238ce9
commit 9a8c32197e
10 changed files with 892 additions and 870 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,10 +9,10 @@
</data>
</layer>
<objectgroup id="1" name="PlayerStartingPos">
<object id="135" x="840" y="530">
<object id="135" x="1400" y="580">
<point/>
</object>
<object id="137" x="959" y="532">
<object id="137" x="1500" y="580">
<point/>
</object>
</objectgroup>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -362,7 +362,7 @@
"array": [
0,
0,
209.57814771583418,
216.46608171234504,
0,
0,
0,
+1 -1
View File
@@ -537,7 +537,7 @@
"array": [
0,
0,
209.57814771583418,
216.46608171234504,
0,
0,
0,
+1 -1
View File
@@ -96,7 +96,7 @@ cc.Class({
const p2Vpos = gopkgs.WorldToVirtualGridPos(boundaryObjs.playerStartingPositions[1].x, boundaryObjs.playerStartingPositions[1].y);
const colliderRadiusV = gopkgs.WorldToVirtualGridPos(12.0, 0);
const speciesIdList = [4096, 1];
const speciesIdList = [1, 4096];
const chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(speciesIdList);
const startRdf = window.pb.protos.RoomDownsyncFrame.create({
+11 -7
View File
@@ -169,30 +169,24 @@ cc.Class({
if (self.btnA) {
self.btnA.on(cc.Node.EventType.TOUCH_START, function(evt) {
self._triggerEdgeBtnA(true);
evt.target.runAction(cc.scaleTo(0.1, 0.3));
});
self.btnA.on(cc.Node.EventType.TOUCH_END, function(evt) {
self._triggerEdgeBtnA(false);
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
self.btnA.on(cc.Node.EventType.TOUCH_CANCEL, function(evt) {
self._triggerEdgeBtnA(false);
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
}
if (self.btnB) {
self.btnB.on(cc.Node.EventType.TOUCH_START, function(evt) {
self._triggerEdgeBtnB(true);
evt.target.runAction(cc.scaleTo(0.1, 0.3));
});
self.btnB.on(cc.Node.EventType.TOUCH_END, function(evt) {
self._triggerEdgeBtnB(false);
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
self.btnB.on(cc.Node.EventType.TOUCH_CANCEL, function(evt) {
self._triggerEdgeBtnB(false);
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
}
@@ -500,13 +494,23 @@ cc.Class({
this.cachedBtnALevel = this.realtimeBtnALevel;
this.btnAEdgeTriggerLock = true;
}
if (rising) {
this.btnA.runAction(cc.scaleTo(0.1, 0.3));
} else {
this.btnA.runAction(cc.scaleTo(0.1, 0.5));
}
},
_triggerEdgeBtnB(rising) {
_triggerEdgeBtnB(rising, evt) {
this.realtimeBtnBLevel = (rising ? 1 : 0);
if (!this.btnBEdgeTriggerLock && (1 - this.realtimeBtnBLevel) == this.cachedBtnBLevel) {
this.cachedBtnBLevel = this.realtimeBtnBLevel;
this.btnBEdgeTriggerLock = true;
}
if (rising) {
this.btnB.runAction(cc.scaleTo(0.1, 0.3));
} else {
this.btnB.runAction(cc.scaleTo(0.1, 0.5));
}
},
});