mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-25 19:28:55 +00:00
Enhanced UI handling upon battle started.
This commit is contained in:
parent
d25bb5ff10
commit
6b3d1ed49a
@ -748,8 +748,9 @@ cc.Class({
|
||||
self.battleState = ALL_BATTLE_STATES.IN_BATTLE;
|
||||
}
|
||||
|
||||
// [WARNING] "cc.Node.removeChild" would trigger massive update of rendering nodes, thus a performance impact at the beginning of battle, avoid it by just moving the widget to infinitely far away!
|
||||
if (self.countdownToBeginGameNode && self.countdownToBeginGameNode.parent) {
|
||||
self.countdownToBeginGameNode.parent.removeChild(self.countdownToBeginGameNode);
|
||||
self.countdownToBeginGameNode.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
|
||||
}
|
||||
|
||||
if (null != self.musicEffectManagerScriptIns) {
|
||||
@ -1233,8 +1234,10 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
|
||||
hideFindingPlayersGUI(rdf) {
|
||||
const self = this;
|
||||
if (null == self.findingPlayerNode.parent) return;
|
||||
self.findingPlayerNode.parent.removeChild(self.findingPlayerNode);
|
||||
// [WARNING] "cc.Node.removeChild" would trigger massive update of rendering nodes, thus a performance impact at the beginning of battle, avoid it by just moving the widget to infinitely far away!
|
||||
if (self.findingPlayerNode && self.findingPlayerNode.parent) {
|
||||
self.findingPlayerNode.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
|
||||
}
|
||||
},
|
||||
|
||||
onBattleReadyToStart(rdf /* pb.RoomDownsyncFrame */ ) {
|
||||
|
@ -22,7 +22,12 @@ const (
|
||||
GRAVITY_X = int32(0)
|
||||
GRAVITY_Y = -int32(float64(0.5) * WORLD_TO_VIRTUAL_GRID_RATIO) // makes all "playerCollider.Y" a multiple of 0.5 in all cases
|
||||
|
||||
INPUT_DELAY_FRAMES = int32(6) // in the count of render frames
|
||||
INPUT_DELAY_FRAMES = int32(6) // in the count of render frames
|
||||
|
||||
/*
|
||||
[WARNING]
|
||||
Experimentally having an input rate > 15 (e.g., 60 >> 2) doesn't improve multiplayer smoothness, in fact higher input rate often results in higher packet loss (both TCP and UDP) thus higher wrong prediction rate!
|
||||
*/
|
||||
INPUT_SCALE_FRAMES = uint32(2) // inputDelayedAndScaledFrameId = ((originalFrameId - InputDelayFrames) >> InputScaleFrames)
|
||||
|
||||
SP_ATK_LOOKUP_FRAMES = int32(5)
|
||||
|
Loading…
Reference in New Issue
Block a user