mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 08:36:52 +00:00
Preparation for native app build.
This commit is contained in:
@@ -198,3 +198,6 @@ window.getOrCreateAnimationClipForGid = function(gid, tiledMapInfo, tilesElListU
|
||||
animationClip: animClip,
|
||||
};
|
||||
};
|
||||
|
||||
// Node.js, this is a workaround to avoid accessing the non-existent "TextDecoder class" from "jsexport.js".
|
||||
window.fs = function() {};
|
||||
|
@@ -362,7 +362,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
216.6734179122529,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@@ -547,7 +547,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.16474188040044,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@@ -75,10 +75,10 @@ cc.Class({
|
||||
onLoad() {
|
||||
BaseCharacter.prototype.onLoad.call(this);
|
||||
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
|
||||
this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
|
||||
if (!this.animComp) {
|
||||
this.animComp = this.effAnimNode.getComponent(cc.Animation);
|
||||
}
|
||||
//this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
|
||||
//if (!this.animComp) {
|
||||
this.animComp = this.effAnimNode.getComponent(cc.Animation);
|
||||
//}
|
||||
this.effAnimNode.active = true;
|
||||
},
|
||||
|
||||
@@ -107,13 +107,13 @@ cc.Class({
|
||||
let playingAnimName = null;
|
||||
let underlyingAnimationCtrl = null;
|
||||
|
||||
if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||
underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper!
|
||||
playingAnimName = underlyingAnimationCtrl.lastAnimationName;
|
||||
} else {
|
||||
underlyingAnimationCtrl = this.animComp.currentClip;
|
||||
playingAnimName = (!underlyingAnimationCtrl ? null : underlyingAnimationCtrl.name);
|
||||
}
|
||||
//if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||
// underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper!
|
||||
// playingAnimName = underlyingAnimationCtrl.lastAnimationName;
|
||||
//} else {
|
||||
underlyingAnimationCtrl = this.animComp.currentClip;
|
||||
playingAnimName = (!underlyingAnimationCtrl ? null : underlyingAnimationCtrl.name);
|
||||
//}
|
||||
|
||||
// It turns out that "prevRdfPlayer.CharacterState" is not useful in this function :)
|
||||
if (newAnimName == playingAnimName && window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
||||
@@ -122,11 +122,11 @@ cc.Class({
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||
this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig);
|
||||
} else {
|
||||
this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig);
|
||||
}
|
||||
//if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||
// this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig);
|
||||
//} else {
|
||||
this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig);
|
||||
//}
|
||||
},
|
||||
|
||||
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig) {
|
||||
|
@@ -81,8 +81,11 @@ NetworkDoctor.prototype.logSkippedRenderFrameCnt = function() {
|
||||
|
||||
NetworkDoctor.prototype.isTooFast = function() {
|
||||
const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = this.stats();
|
||||
if (sendingFps >= this.inputRateThreshold && srvDownsyncFps >= this.inputRateThreshold) {
|
||||
// At least my network is OK for both TX & RX directions.
|
||||
if (sendingFps >= this.inputRateThreshold + 2) {
|
||||
// Don't send too fast
|
||||
return true;
|
||||
} else if (sendingFps >= this.inputRateThreshold && srvDownsyncFps >= this.inputRateThreshold) {
|
||||
// At least my network is OK for both TX & RX directions -- PING value might help as a supplement information here to confirm that the "selfPlayer" is not lagged in RX which results in the "rollbackFrames", but not necessary -- a significant lag within the "inputFrameDownsyncQ" will reduce "srvDownsyncFps".
|
||||
if (rollbackFrames >= this.rollbackFramesThreshold) {
|
||||
// I got many frames rolled back while none of my peers effectively helped my preciction. Deliberately not using "peerUpsyncThreshold" here because when using UDP p2p upsync broadcasting, we expect to receive effective p2p upsyncs from every other player.
|
||||
return true;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "40edd08e-316c-44b8-a50f-bd173554c554",
|
||||
"isPlugin": true,
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
Reference in New Issue
Block a user