mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 00:26:39 +00:00
A temp broken commit except for OfflineMap - refactoring jumping.
This commit is contained in:
@@ -5,33 +5,15 @@ window.ATK_CHARACTER_STATE = {
|
||||
Walking: [1, "Walking"],
|
||||
Atk1: [2, "Atk1"],
|
||||
Atked1: [3, "Atked1"],
|
||||
InAirIdle1: [4, "InAirIdle1"],
|
||||
InAirAtk1: [5, "Atk1"],
|
||||
InAirAtked1: [6, "Atked1"],
|
||||
InAirIdle1NoJump: [4, "InAirIdle1NoJump"],
|
||||
InAirIdle1ByJump: [5, "InAirIdle1ByJump"], // The cycling part of it would be exactly "InAirIdle1NoJump"
|
||||
InAirAtk1: [6, "InAirAtk1"],
|
||||
InAirAtked1: [7, "InAirAtked1"],
|
||||
BlownUp1: [8, "BlownUp1"],
|
||||
LayDown1: [9, "LayDown1"],
|
||||
GetUp1: [10, "GetUp1"],
|
||||
};
|
||||
|
||||
window.toInAirConjugate = function(foo) {
|
||||
switch (foo) {
|
||||
case window.ATK_CHARACTER_STATE.Idle1[0]:
|
||||
case window.ATK_CHARACTER_STATE.Walking[0]:
|
||||
return window.ATK_CHARACTER_STATE.InAirIdle1[0];
|
||||
case window.ATK_CHARACTER_STATE.Atk1[0]:
|
||||
return window.ATK_CHARACTER_STATE.InAirAtk1[0];
|
||||
case window.ATK_CHARACTER_STATE.Atked1[0]:
|
||||
return window.ATK_CHARACTER_STATE.InAirAtked1[0];
|
||||
|
||||
case window.ATK_CHARACTER_STATE.InAirIdle1[0]:
|
||||
return window.ATK_CHARACTER_STATE.Idle1[0];
|
||||
case window.ATK_CHARACTER_STATE.InAirAtk1[0]:
|
||||
return window.ATK_CHARACTER_STATE.Atk1[0];
|
||||
case window.ATK_CHARACTER_STATE.InAirAtked1[0]:
|
||||
return window.ATK_CHARACTER_STATE.Atked1[0];
|
||||
default:
|
||||
console.warn(`Invalid characterState ${foo} received, no in air conjugate is available!`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
window.ATK_CHARACTER_STATE_ARR = [];
|
||||
for (let k in window.ATK_CHARACTER_STATE) {
|
||||
window.ATK_CHARACTER_STATE_ARR.push(window.ATK_CHARACTER_STATE[k]);
|
||||
@@ -40,12 +22,18 @@ for (let k in window.ATK_CHARACTER_STATE) {
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET = new Set();
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Idle1[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Walking[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1ByJump[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.BlownUp1[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.LayDown1[0]);
|
||||
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.GetUp1[0]);
|
||||
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET = new Set();
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1[0]);
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0]);
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1ByJump[0]);
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirAtk1[0]);
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirAtked1[0]);
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.BlownUp1[0]);
|
||||
|
||||
/*
|
||||
Kindly note that the use of dragonBones anim is an informed choice for the feasibility of "gotoAndPlayByFrame", which is a required feature by "Map.rollbackAndChase". You might find that "cc.Animation" -- the traditional frame anim -- can also suffice this requirement, yet if we want to develop 3D frontend in the future, working with skeletal anim will make a smoother transition.
|
||||
@@ -80,11 +68,11 @@ cc.Class({
|
||||
this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
|
||||
if (!this.animComp) {
|
||||
this.animComp = this.effAnimNode.getComponent(cc.Animation);
|
||||
}
|
||||
}
|
||||
this.effAnimNode.active = true;
|
||||
},
|
||||
|
||||
updateCharacterAnim(rdfPlayer, prevRdfPlayer, forceAnimSwitch) {
|
||||
updateCharacterAnim(rdfPlayer, prevRdfPlayer, forceAnimSwitch, chConfig) {
|
||||
// As this function might be called after many frames of a rollback, it's possible that the playing animation was predicted, different from "prevRdfPlayer.CharacterState" but same as "newCharacterState". More granular checks are needed to determine whether we should interrupt the playing animation.
|
||||
|
||||
// Update directions
|
||||
@@ -117,29 +105,25 @@ cc.Class({
|
||||
}
|
||||
|
||||
if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||
this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName);
|
||||
this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig);
|
||||
} else {
|
||||
this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName);
|
||||
this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig);
|
||||
}
|
||||
},
|
||||
|
||||
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName) {
|
||||
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig) {
|
||||
if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
||||
// No "framesToRecover"
|
||||
// console.warn(`#DragonBones JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`);
|
||||
underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, 0, -1);
|
||||
} else {
|
||||
const animationData = underlyingAnimationCtrl._animations[newAnimName];
|
||||
let fromAnimFrame = (animationData.frameCount - rdfPlayer.FramesToRecover);
|
||||
if (fromAnimFrame < 0) {
|
||||
// For Atk1 or Atk2, it's possible that the "meleeBullet.recoveryFrames" is configured to be slightly larger than corresponding animation duration frames
|
||||
fromAnimFrame = 0;
|
||||
}
|
||||
underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, fromAnimFrame, 1);
|
||||
let frameIdxInAnim = rdfPlayer.FramesInChState;
|
||||
underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, frameIdxInAnim, 1);
|
||||
}
|
||||
},
|
||||
|
||||
_interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName) {
|
||||
_interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig) {
|
||||
if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
||||
// No "framesToRecover"
|
||||
//console.warn(`#FrameAnim JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`);
|
||||
@@ -148,11 +132,11 @@ cc.Class({
|
||||
}
|
||||
// The "playTimes" counterpart is managed by each "cc.AnimationClip.wrapMode", already preset in the editor.
|
||||
const targetClip = this.animComp.getClips()[newCharacterState]; // The clips follow the exact order in ATK_CHARACTER_STATE
|
||||
let fromTime = (targetClip.duration - rdfPlayer.FramesToRecover / targetClip.sample); // TODO: Anyway to avoid using division here?
|
||||
if (fromTime < 0) {
|
||||
// For Atk1 or Atk2, it's possible that the "meleeBullet.recoveryFrames" is configured to be slightly larger than corresponding animation duration frames
|
||||
fromTime = 0;
|
||||
}
|
||||
let frameIdxInAnim = rdfPlayer.FramesInChState;
|
||||
if (window.ATK_CHARACTER_STATE.InAirIdle1ByJump == newCharacterState && null != chConfig) {
|
||||
frameIdxInAnim = chConfig.InAirIdleFrameIdxTurningPoint + (frameIdxInAnim - chConfig.InAirIdleFrameIdxTurningPoint) % chConfig.InAirIdleFrameIdxTurnedCycle; // TODO: Anyway to avoid using division here?
|
||||
}
|
||||
let fromTime = (frameIdxInAnim / targetClip.sample); // TODO: Anyway to avoid using division here?
|
||||
this.animComp.play(newAnimName, fromTime);
|
||||
},
|
||||
|
||||
|
@@ -590,7 +590,7 @@ cc.Class({
|
||||
const jsPlayersArr = new Array().fill(null);
|
||||
for (let k in pbRdf.playersArr) {
|
||||
const pbPlayer = pbRdf.playersArr[k];
|
||||
const jsPlayer = gopkgs.NewPlayerDownsyncJs(pbPlayer.id, pbPlayer.virtualGridX, pbPlayer.virtualGridY, pbPlayer.dirX, pbPlayer.dirY, pbPlayer.velX, pbPlayer.velY, pbPlayer.framesToRecover, pbPlayer.speed, pbPlayer.battleState, pbPlayer.characterState, pbPlayer.joinIndex, pbPlayer.hp, pbPlayer.maxHp, pbPlayer.inAir, pbPlayer.colliderRadius);
|
||||
const jsPlayer = gopkgs.NewPlayerDownsyncJs(pbPlayer.id, pbPlayer.virtualGridX, pbPlayer.virtualGridY, pbPlayer.dirX, pbPlayer.dirY, pbPlayer.velX, pbPlayer.velY, pbPlayer.framesToRecover, pbPlayer.framesInChState, pbPlayer.speed, pbPlayer.battleState, pbPlayer.characterState, pbPlayer.joinIndex, pbPlayer.hp, pbPlayer.maxHp, pbPlayer.inAir, pbPlayer.colliderRadius);
|
||||
jsPlayersArr[k] = jsPlayer;
|
||||
}
|
||||
const jsMeleeBulletsArr = [];
|
||||
@@ -638,6 +638,7 @@ cc.Class({
|
||||
}
|
||||
|
||||
// The logic below applies to (window.MAGIC_ROOM_DOWNSYNC_FRAME_ID.BATTLE_START == rdf.id || window.RING_BUFF_NON_CONSECUTIVE_SET == dumpRenderCacheRet)
|
||||
self.chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(pbRdf.speciesIdList);
|
||||
self.playerOpPatternToSkillId = pbRdf.playerOpPatternToSkillId;
|
||||
self._initPlayerRichInfoDict(rdf.PlayersArr);
|
||||
|
||||
@@ -694,18 +695,19 @@ cc.Class({
|
||||
|
||||
equalPlayers(lhs, rhs) {
|
||||
if (null == lhs || null == rhs) return false;
|
||||
if (lhs.virtualGridX != rhs.virtualGridX) return false;
|
||||
if (lhs.virtualGridY != rhs.virtualGridY) return false;
|
||||
if (lhs.dirX != rhs.dirX) return false;
|
||||
if (lhs.dirY != rhs.dirY) return false;
|
||||
if (lhs.velX != rhs.velX) return false;
|
||||
if (lhs.velY != rhs.velY) return false;
|
||||
if (lhs.speed != rhs.speed) return false;
|
||||
if (lhs.framesToRecover != rhs.framesToRecover) return false;
|
||||
if (lhs.hp != rhs.hp) return false;
|
||||
if (lhs.maxHp != rhs.maxHp) return false;
|
||||
if (lhs.characterState != rhs.characterState) return false;
|
||||
if (lhs.inAir != rhs.inAir) return false;
|
||||
if (lhs.VirtualGridX != rhs.VirtualGridX) return false;
|
||||
if (lhs.VirtualGridY != rhs.VirtualGridY) return false;
|
||||
if (lhs.DirX != rhs.DirX) return false;
|
||||
if (lhs.DirY != rhs.DirY) return false;
|
||||
if (lhs.VelX != rhs.VelX) return false;
|
||||
if (lhs.VelY != rhs.VelY) return false;
|
||||
if (lhs.Speed != rhs.Speed) return false;
|
||||
if (lhs.Hp != rhs.Hp) return false;
|
||||
if (lhs.MaxHp != rhs.MaxHp) return false;
|
||||
if (lhs.CharacterState != rhs.CharacterState) return false;
|
||||
if (lhs.InAir != rhs.InAir) return false;
|
||||
if (lhs.FramesToRecover != rhs.FramesToRecover) return false;
|
||||
if (lhs.FramesInChState != rhs.FramesInChState) return false;
|
||||
return true;
|
||||
},
|
||||
|
||||
@@ -1063,12 +1065,13 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
const playersArr = rdf.PlayersArr;
|
||||
for (let k in playersArr) {
|
||||
const currPlayerDownsync = playersArr[k];
|
||||
const chConfig = self.chConfigsOrderedByJoinIndex[k];
|
||||
const prevRdfPlayer = (null == prevRdf ? null : prevRdf.PlayersArr[k]);
|
||||
const [wx, wy] = self.virtualGridToWorldPos(currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY);
|
||||
const playerRichInfo = self.playerRichInfoArr[k];
|
||||
playerRichInfo.node.setPosition(wx, wy);
|
||||
playerRichInfo.scriptIns.updateSpeed(currPlayerDownsync.Speed);
|
||||
playerRichInfo.scriptIns.updateCharacterAnim(currPlayerDownsync, prevRdfPlayer, false);
|
||||
playerRichInfo.scriptIns.updateCharacterAnim(currPlayerDownsync, prevRdfPlayer, false, chConfig);
|
||||
}
|
||||
|
||||
// Update countdown
|
||||
@@ -1104,7 +1107,7 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
};
|
||||
self.rdfIdToActuallyUsedInput.set(currRdf.Id, inputFrameDownsyncClone);
|
||||
}
|
||||
const nextRdf = gopkgs.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(self.recentInputCache, currRdf, collisionSys, collisionSysMap, self.gravityX, self.gravityY, self.jumpingInitVelY, self.inputDelayFrames, self.inputScaleFrames, self.spaceOffsetX, self.spaceOffsetY, self.snapIntoPlatformOverlap, self.snapIntoPlatformThreshold, self.worldToVirtualGridRatio, self.virtualGridToWorldRatio, self.playerOpPatternToSkillId);
|
||||
const nextRdf = gopkgs.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(self.recentInputCache, currRdf, collisionSys, collisionSysMap, self.spaceOffsetX, self.spaceOffsetY, self.playerOpPatternToSkillId, self.chConfigsOrderedByJoinIndex);
|
||||
|
||||
if (true == isChasing) {
|
||||
// [WARNING] Move the cursor "self.chaserRenderFrameId" when "true == isChasing", keep in mind that "self.chaserRenderFrameId" is not monotonic!
|
||||
|
@@ -40,13 +40,13 @@ cc.Class({
|
||||
self.rollbackEstimatedDtNanos = 16666666;
|
||||
self.tooFastDtIntervalMillis = 0.5 * self.rollbackEstimatedDtMillis;
|
||||
|
||||
self.worldToVirtualGridRatio = 1000;
|
||||
self.worldToVirtualGridRatio = 100;
|
||||
self.virtualGridToWorldRatio = 1.0 / self.worldToVirtualGridRatio;
|
||||
|
||||
const opJoinIndexPrefix1 = (1 << 8);
|
||||
const opJoinIndexPrefix2 = (2 << 8);
|
||||
self.playerOpPatternToSkillId = {};
|
||||
self.playerOpPatternToSkillId[opJoinIndexPrefix1 + 0] = 1;
|
||||
self.playerOpPatternToSkillId[opJoinIndexPrefix2 + 0] = 1;
|
||||
const playerOpPatternToSkillId = {};
|
||||
playerOpPatternToSkillId[opJoinIndexPrefix1 + 0] = 1;
|
||||
playerOpPatternToSkillId[opJoinIndexPrefix1 + 1] = 2;
|
||||
|
||||
/*
|
||||
[WARNING] As when a character is standing on a barrier, if not carefully curated there MIGHT BE a bouncing sequence of "[(inAir -> dropIntoBarrier ->), (notInAir -> pushedOutOfBarrier ->)], [(inAir -> ..."
|
||||
@@ -152,7 +152,7 @@ cc.Class({
|
||||
virtualGridY: boundaryObjs.playerStartingPositions[0].y * self.worldToVirtualGridRatio,
|
||||
speed: 1 * self.worldToVirtualGridRatio,
|
||||
colliderRadius: 12,
|
||||
characterState: window.ATK_CHARACTER_STATE.InAirIdle1[0],
|
||||
characterState: window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0],
|
||||
framesToRecover: 0,
|
||||
dirX: 0,
|
||||
dirY: 0,
|
||||
@@ -160,22 +160,9 @@ cc.Class({
|
||||
velY: 0,
|
||||
inAir: true,
|
||||
}),
|
||||
window.pb.protos.PlayerDownsync.create({
|
||||
id: 11,
|
||||
joinIndex: 2,
|
||||
virtualGridX: boundaryObjs.playerStartingPositions[1].x * self.worldToVirtualGridRatio,
|
||||
virtualGridY: boundaryObjs.playerStartingPositions[1].y * self.worldToVirtualGridRatio,
|
||||
speed: 1 * self.worldToVirtualGridRatio,
|
||||
colliderRadius: 12,
|
||||
characterState: window.ATK_CHARACTER_STATE.InAirIdle1[0],
|
||||
framesToRecover: 0,
|
||||
dirX: 0,
|
||||
dirY: 0,
|
||||
velX: 0,
|
||||
velY: 0,
|
||||
inAir: true,
|
||||
}),
|
||||
]
|
||||
],
|
||||
speciesIdList: [0],
|
||||
playerOpPatternToSkillId: playerOpPatternToSkillId,
|
||||
});
|
||||
|
||||
self.selfPlayerInfo = {
|
||||
@@ -221,4 +208,48 @@ cc.Class({
|
||||
}
|
||||
},
|
||||
|
||||
spawnPlayerNode(joinIndex, vx, vy, playerDownsyncInfo) {
|
||||
const self = this;
|
||||
const newPlayerNode = cc.instantiate(self.controlledCharacterPrefab)
|
||||
const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter");
|
||||
if (1 == joinIndex) {
|
||||
playerScriptIns.setSpecies("MonkGirl");
|
||||
} else if (2 == joinIndex) {
|
||||
playerScriptIns.setSpecies("UltramanTiga");
|
||||
}
|
||||
|
||||
const [wx, wy] = self.virtualGridToWorldPos(vx, vy);
|
||||
newPlayerNode.setPosition(wx, wy);
|
||||
playerScriptIns.mapNode = self.node;
|
||||
const colliderRadius = playerDownsyncInfo.ColliderRadius;
|
||||
const halfColliderWidth = colliderRadius,
|
||||
halfColliderHeight = colliderRadius + colliderRadius; // avoid multiplying
|
||||
const colliderWidth = halfColliderWidth + halfColliderWidth,
|
||||
colliderHeight = halfColliderHeight + halfColliderHeight; // avoid multiplying
|
||||
|
||||
const [cx, cy] = gopkgs.WorldToPolygonColliderBLPos(wx, wy, halfColliderWidth, halfColliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY);
|
||||
const gopkgsBoundaryAnchor = gopkgs.NewVec2DJs(cx, cy);
|
||||
const gopkgsBoundaryPts = [
|
||||
gopkgs.NewVec2DJs(0, 0),
|
||||
gopkgs.NewVec2DJs(self.snapIntoPlatformOverlap + colliderWidth + self.snapIntoPlatformOverlap, 0),
|
||||
gopkgs.NewVec2DJs(self.snapIntoPlatformOverlap + colliderWidth + self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap + colliderHeight + self.snapIntoPlatformOverlap),
|
||||
gopkgs.NewVec2DJs(0, self.snapIntoPlatformOverlap + colliderHeight + self.snapIntoPlatformOverlap)
|
||||
];
|
||||
const gopkgsBoundary = gopkgs.NewPolygon2DJs(gopkgsBoundaryAnchor, gopkgsBoundaryPts);
|
||||
const newPlayerCollider = gopkgs.GenerateConvexPolygonColliderJs(gopkgsBoundary, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player");
|
||||
//const newPlayerCollider = gopkgs.GenerateRectColliderJs(wx, wy, colliderWidth, colliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player");
|
||||
self.gopkgsCollisionSys.Add(newPlayerCollider);
|
||||
const collisionPlayerIndex = self.collisionPlayerIndexPrefix + joinIndex;
|
||||
self.gopkgsCollisionSysMap[collisionPlayerIndex] = newPlayerCollider;
|
||||
|
||||
console.log(`Created new player collider: joinIndex=${joinIndex}, colliderRadius=${playerDownsyncInfo.ColliderRadius}`);
|
||||
|
||||
safelyAddChild(self.node, newPlayerNode);
|
||||
setLocalZOrder(newPlayerNode, 5);
|
||||
|
||||
newPlayerNode.active = true;
|
||||
playerScriptIns.updateCharacterAnim(playerDownsyncInfo, null, true);
|
||||
|
||||
return [newPlayerNode, playerScriptIns];
|
||||
},
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "da0a517f-5c74-4fc0-ba89-dbcee184b13e",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@@ -1210,6 +1210,7 @@ $root.protos = (function() {
|
||||
* @property {number|null} [maxHp] PlayerDownsync maxHp
|
||||
* @property {number|null} [characterState] PlayerDownsync characterState
|
||||
* @property {boolean|null} [inAir] PlayerDownsync inAir
|
||||
* @property {number|null} [framesInChState] PlayerDownsync framesInChState
|
||||
* @property {string|null} [name] PlayerDownsync name
|
||||
* @property {string|null} [displayName] PlayerDownsync displayName
|
||||
* @property {string|null} [avatar] PlayerDownsync avatar
|
||||
@@ -1382,6 +1383,14 @@ $root.protos = (function() {
|
||||
*/
|
||||
PlayerDownsync.prototype.inAir = false;
|
||||
|
||||
/**
|
||||
* PlayerDownsync framesInChState.
|
||||
* @member {number} framesInChState
|
||||
* @memberof protos.PlayerDownsync
|
||||
* @instance
|
||||
*/
|
||||
PlayerDownsync.prototype.framesInChState = 0;
|
||||
|
||||
/**
|
||||
* PlayerDownsync name.
|
||||
* @member {string} name
|
||||
@@ -1468,12 +1477,14 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 18, wireType 0 =*/144).int32(message.characterState);
|
||||
if (message.inAir != null && Object.hasOwnProperty.call(message, "inAir"))
|
||||
writer.uint32(/* id 19, wireType 0 =*/152).bool(message.inAir);
|
||||
if (message.framesInChState != null && Object.hasOwnProperty.call(message, "framesInChState"))
|
||||
writer.uint32(/* id 20, wireType 0 =*/160).int32(message.framesInChState);
|
||||
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
||||
writer.uint32(/* id 20, wireType 2 =*/162).string(message.name);
|
||||
writer.uint32(/* id 997, wireType 2 =*/7978).string(message.name);
|
||||
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
|
||||
writer.uint32(/* id 21, wireType 2 =*/170).string(message.displayName);
|
||||
writer.uint32(/* id 998, wireType 2 =*/7986).string(message.displayName);
|
||||
if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
|
||||
writer.uint32(/* id 22, wireType 2 =*/178).string(message.avatar);
|
||||
writer.uint32(/* id 999, wireType 2 =*/7994).string(message.avatar);
|
||||
return writer;
|
||||
};
|
||||
|
||||
@@ -1585,14 +1596,18 @@ $root.protos = (function() {
|
||||
break;
|
||||
}
|
||||
case 20: {
|
||||
message.framesInChState = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 997: {
|
||||
message.name = reader.string();
|
||||
break;
|
||||
}
|
||||
case 21: {
|
||||
case 998: {
|
||||
message.displayName = reader.string();
|
||||
break;
|
||||
}
|
||||
case 22: {
|
||||
case 999: {
|
||||
message.avatar = reader.string();
|
||||
break;
|
||||
}
|
||||
@@ -1688,6 +1703,9 @@ $root.protos = (function() {
|
||||
if (message.inAir != null && message.hasOwnProperty("inAir"))
|
||||
if (typeof message.inAir !== "boolean")
|
||||
return "inAir: boolean expected";
|
||||
if (message.framesInChState != null && message.hasOwnProperty("framesInChState"))
|
||||
if (!$util.isInteger(message.framesInChState))
|
||||
return "framesInChState: integer expected";
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
if (!$util.isString(message.name))
|
||||
return "name: string expected";
|
||||
@@ -1750,6 +1768,8 @@ $root.protos = (function() {
|
||||
message.characterState = object.characterState | 0;
|
||||
if (object.inAir != null)
|
||||
message.inAir = Boolean(object.inAir);
|
||||
if (object.framesInChState != null)
|
||||
message.framesInChState = object.framesInChState | 0;
|
||||
if (object.name != null)
|
||||
message.name = String(object.name);
|
||||
if (object.displayName != null)
|
||||
@@ -1792,6 +1812,7 @@ $root.protos = (function() {
|
||||
object.maxHp = 0;
|
||||
object.characterState = 0;
|
||||
object.inAir = false;
|
||||
object.framesInChState = 0;
|
||||
object.name = "";
|
||||
object.displayName = "";
|
||||
object.avatar = "";
|
||||
@@ -1834,6 +1855,8 @@ $root.protos = (function() {
|
||||
object.characterState = message.characterState;
|
||||
if (message.inAir != null && message.hasOwnProperty("inAir"))
|
||||
object.inAir = message.inAir;
|
||||
if (message.framesInChState != null && message.hasOwnProperty("framesInChState"))
|
||||
object.framesInChState = message.framesInChState;
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
object.name = message.name;
|
||||
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
||||
|
Reference in New Issue
Block a user