mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 00:26:39 +00:00
Drafted basic jumping.
This commit is contained in:
@@ -20,6 +20,11 @@ window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Id
|
||||
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_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.InAirAtk1[0]);
|
||||
window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirAtked1[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.
|
||||
|
||||
@@ -101,7 +106,7 @@ cc.Class({
|
||||
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName) {
|
||||
if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
||||
// No "framesToRecover"
|
||||
//console.warn(`#DragonBones JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`);
|
||||
console.warn(`#DragonBones JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`);
|
||||
underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, 0, -1);
|
||||
} else {
|
||||
const animationData = underlyingAnimationCtrl._animations[newAnimName];
|
||||
@@ -117,7 +122,7 @@ cc.Class({
|
||||
_interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName) {
|
||||
if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
||||
// No "framesToRecover"
|
||||
//console.warn(`#DragonBones JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`);
|
||||
//console.warn(`#FrameAnim JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`);
|
||||
this.animComp.play(newAnimName, 0);
|
||||
return;
|
||||
}
|
||||
|
@@ -320,7 +320,11 @@ cc.Class({
|
||||
bulletPushbacks[joinIndex - 1][0] += xfac * bulletCollider.data.pushback; // Only for straight punch, there's no y-pushback
|
||||
bulletPushbacks[joinIndex - 1][1] += 0;
|
||||
const thatAckedPlayerInNextFrame = nextRenderFramePlayers[potential.data.id];
|
||||
thatAckedPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Atked1[0];
|
||||
if (!window.ATK_CHARACTER_STATE_IN_AIR_SET.has(thatAckedPlayerInNextFrame.characterState)) {
|
||||
thatAckedPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Atked1[0];
|
||||
} else {
|
||||
thatAckedPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.InAirAtked1[0];
|
||||
}
|
||||
const oldFramesToRecover = thatAckedPlayerInNextFrame.framesToRecover;
|
||||
thatAckedPlayerInNextFrame.framesToRecover = (oldFramesToRecover > bulletCollider.data.hitStunFrames ? oldFramesToRecover : bulletCollider.data.hitStunFrames); // In case the hit player is already stun, we extend it
|
||||
}
|
||||
@@ -368,9 +372,9 @@ cc.Class({
|
||||
}
|
||||
|
||||
const decodedInput = self.ctrl.decodeInput(inputList[joinIndex - 1]);
|
||||
|
||||
const prevDecodedInput = (null == delayedInputFrameForPrevRenderFrame ? null : self.ctrl.decodeInput(delayedInputFrameForPrevRenderFrame.inputList[joinIndex - 1]));
|
||||
const prevBtnALevel = (null == prevDecodedInput ? 0 : prevDecodedInput.btnALevel);
|
||||
const prevBtnBLevel = (null == prevDecodedInput ? 0 : prevDecodedInput.btnBLevel);
|
||||
|
||||
if (1 == decodedInput.btnALevel && 0 == prevBtnALevel) {
|
||||
// console.log(`playerId=${playerId} triggered a rising-edge of btnA at renderFrame.id=${currRenderFrame.id}, delayedInputFrame.id=${delayedInputFrame.inputFrameId}`);
|
||||
@@ -386,21 +390,61 @@ cc.Class({
|
||||
// console.log(`A rising-edge of meleeBullet is created at renderFrame.id=${currRenderFrame.id}, delayedInputFrame.id=${delayedInputFrame.inputFrameId}: ${self._stringifyRecentInputCache(true)}`);
|
||||
// console.log(`A rising-edge of meleeBullet is created at renderFrame.id=${currRenderFrame.id}, delayedInputFrame.id=${delayedInputFrame.inputFrameId}`);
|
||||
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Atk1[0];
|
||||
if (!window.ATK_CHARACTER_STATE_IN_AIR_SET.has(currPlayerDownsync.characterState)) {
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Atk1[0];
|
||||
} else {
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.InAirAtk1[0];
|
||||
}
|
||||
}
|
||||
} else if (0 == decodedInput.btnALevel && 1 == prevBtnALevel) {
|
||||
// console.log(`playerId=${playerId} triggered a falling-edge of btnA at renderFrame.id=${currRenderFrame.id}, delayedInputFrame.id=${delayedInputFrame.inputFrameId}`);
|
||||
} else {
|
||||
// No bullet trigger, process movement inputs
|
||||
if (0 != decodedInput.dx || 0 != decodedInput.dy) {
|
||||
// Update directions and thus would eventually update moving animation accordingly
|
||||
thatPlayerInNextFrame.dirX = decodedInput.dx;
|
||||
thatPlayerInNextFrame.dirY = decodedInput.dy;
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Walking[0];
|
||||
thatPlayerInNextFrame.velX = currPlayerDownsync.speed * decodedInput.dx;
|
||||
if (1 == decodedInput.btnBLevel && 0 == prevBtnBLevel) {
|
||||
const characStateAlreadyInAir = window.ATK_CHARACTER_STATE_IN_AIR_SET.has(thatPlayerInNextFrame.characterState);
|
||||
const characStateIsInterruptWaivable = window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(thatPlayerInNextFrame.characterState);
|
||||
console.log(`playerId=${playerId} triggered a rising-edge of btnB at renderFrame.id=${currRenderFrame.id}, delayedInputFrame.id=${delayedInputFrame.inputFrameId}, characStateAlreadyInAir=${characStateAlreadyInAir}, characStateIsInterruptWaivable=${characStateIsInterruptWaivable}`);
|
||||
if (
|
||||
!characStateAlreadyInAir
|
||||
&&
|
||||
characStateIsInterruptWaivable
|
||||
) {
|
||||
thatPlayerInNextFrame.velY = currPlayerDownsync.speed * 4;
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.InAirIdle1[0];
|
||||
if (window.ATK_CHARACTER_STATE.Walking[0] == currPlayerDownsync.characterState) {
|
||||
console.warn(`curRenderFrameId=${currRenderFrame.id}, playerId=${playerId}, joinIndex=${joinIndex} characterState set to AirIdle1 by jumping`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Idle1[0];
|
||||
thatPlayerInNextFrame.velX = 0; // I believe that while jumping, velX shouldn't be snapped to 0 but let's put it this way for now
|
||||
if (0 != decodedInput.dx || 0 != decodedInput.dy) {
|
||||
// Update directions and thus would eventually update moving animation accordingly
|
||||
thatPlayerInNextFrame.dirX = decodedInput.dx;
|
||||
thatPlayerInNextFrame.dirY = decodedInput.dy;
|
||||
if (!window.ATK_CHARACTER_STATE_IN_AIR_SET.has(thatPlayerInNextFrame.characterState)) {
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Walking[0];
|
||||
thatPlayerInNextFrame.velX = currPlayerDownsync.speed * decodedInput.dx;
|
||||
if (window.ATK_CHARACTER_STATE.Idle1[0] == currPlayerDownsync.characterState || window.ATK_CHARACTER_STATE.InAirIdle1[0] == currPlayerDownsync.characterState) {
|
||||
console.warn(`curRenderFrameId=${currRenderFrame.id}, playerId=${playerId}, joinIndex=${joinIndex} characterState set to Walking by dir input`);
|
||||
}
|
||||
} else {
|
||||
// There's no characterState of "InAirWalking" :)
|
||||
thatPlayerInNextFrame.velX = currPlayerDownsync.speed * decodedInput.dx;
|
||||
}
|
||||
} else {
|
||||
if (!window.ATK_CHARACTER_STATE_IN_AIR_SET.has(thatPlayerInNextFrame.characterState)) {
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Idle1[0];
|
||||
thatPlayerInNextFrame.velX = 0;
|
||||
if (window.ATK_CHARACTER_STATE.Walking[0] == currPlayerDownsync.characterState) {
|
||||
console.warn(`curRenderFrameId=${currRenderFrame.id}, playerId=${playerId}, joinIndex=${joinIndex} characterState set to Idle1 by no dir input`);
|
||||
}
|
||||
} else {
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.InAirIdle1[0];
|
||||
if (window.ATK_CHARACTER_STATE.Walking[0] == currPlayerDownsync.characterState) {
|
||||
console.warn(`curRenderFrameId=${currRenderFrame.id}, playerId=${playerId}, joinIndex=${joinIndex} characterState set to AirIdle1 by no dir input but already in air`);
|
||||
}
|
||||
// let inertia carry "velX" when in air
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,28 +470,33 @@ cc.Class({
|
||||
let [pushbackX, pushbackY] = [result2.overlap * result2.overlap_x, result2.overlap * result2.overlap_y];
|
||||
if (null == potential.data) {
|
||||
// "null == potential.data" implies a barrier
|
||||
fallStopping = (currPlayerDownsync.inAir && 0 > pushbackY); // prevents false fall-stopping on the lateral sides
|
||||
remainsNotInAir = (!currPlayerDownsync.inAir);
|
||||
|
||||
const localFallStopping = (currPlayerDownsync.inAir && 0 > pushbackY); // prevents false fall-stopping on the lateral sides
|
||||
const localRemainsNotInAir = (!currPlayerDownsync.inAir);
|
||||
// [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 -> ..."
|
||||
if (fallStopping) {
|
||||
if (localFallStopping) {
|
||||
pushbackY = 0.95 * pushbackY;
|
||||
fallStopping = true;
|
||||
}
|
||||
if (remainsNotInAir) {
|
||||
if (localRemainsNotInAir) {
|
||||
pushbackY = 0;
|
||||
remainsNotInAir = true;
|
||||
}
|
||||
}
|
||||
// What if we're on the edge of 2 barriers? Would adding up make an unexpected bounce?
|
||||
effPushbacks[joinIndex - 1][0] += pushbackX;
|
||||
effPushbacks[joinIndex - 1][1] += pushbackY;
|
||||
}
|
||||
if (fallStopping || remainsNotInAir) {
|
||||
if (fallStopping) {
|
||||
thatPlayerInNextFrame.velX = 0;
|
||||
thatPlayerInNextFrame.characterState = window.ATK_CHARACTER_STATE.Idle1[0];
|
||||
thatPlayerInNextFrame.velY = 0;
|
||||
thatPlayerInNextFrame.inAir = false;
|
||||
if (window.ATK_CHARACTER_STATE.Walking[0] == currPlayerDownsync.characterState) {
|
||||
console.warn(`curRenderFrameId=${currRenderFrame.id}, playerId=${playerId}, joinIndex=${joinIndex} characterState set to Idle1 by fallStopping`);
|
||||
}
|
||||
}
|
||||
if (false == currPlayerDownsync.inAir && true == thatPlayerInNextFrame.inAir) {
|
||||
console.warn(`curRenderFrameId=${currRenderFrame.id}, playerId=${playerId}, joinIndex=${joinIndex} jumping into air: playerllider._coords=${playerCollider._coords}, playerColliderPotential=${0 >= potentials.length ? null : potentials[0]._coords}
|
||||
movement=${movements[joinIndex - 1]}, effPushback=${effPushbacks[joinIndex - 1]}`);
|
||||
if (remainsNotInAir) {
|
||||
thatPlayerInNextFrame.inAir = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -99,6 +99,7 @@ cc.Class({
|
||||
this.cachedBtnLeftLevel = 0;
|
||||
this.cachedBtnRightLevel = 0;
|
||||
this.cachedBtnALevel = 0;
|
||||
this.cachedBtnBLevel = 0;
|
||||
|
||||
this.canvasNode = this.mapNode.parent;
|
||||
this.mainCameraNode = this.canvasNode.getChildByName("Main Camera"); // Cannot drag and assign the `mainCameraNode` from CocosCreator EDITOR directly, otherwise it'll cause an infinite loading time, till v2.1.0.
|
||||
@@ -168,6 +169,9 @@ cc.Class({
|
||||
case cc.macro.KEY.h:
|
||||
self.cachedBtnALevel = 1;
|
||||
break;
|
||||
case cc.macro.KEY.j:
|
||||
self.cachedBtnBLevel = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -190,6 +194,9 @@ cc.Class({
|
||||
case cc.macro.KEY.h:
|
||||
self.cachedBtnALevel = 0;
|
||||
break;
|
||||
case cc.macro.KEY.j:
|
||||
self.cachedBtnBLevel = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -400,7 +407,8 @@ cc.Class({
|
||||
getEncodedInput() {
|
||||
const discretizedDir = this.discretizeDirection(this.stickhead.x, this.stickhead.y, this.joyStickEps).encodedIdx; // There're only 9 dirs, thus using only the lower 4-bits
|
||||
const btnALevel = (this.cachedBtnALevel << 4);
|
||||
return (btnALevel + discretizedDir);
|
||||
const btnBLevel = (this.cachedBtnBLevel << 5);
|
||||
return (btnBLevel + btnALevel + discretizedDir);
|
||||
},
|
||||
|
||||
decodeInput(encodedInput) {
|
||||
@@ -410,10 +418,12 @@ cc.Class({
|
||||
console.error("Unexpected encodedDirection = ", encodedDirection);
|
||||
}
|
||||
const btnALevel = ((encodedInput >> 4) & 1);
|
||||
const btnBLevel = ((encodedInput >> 5) & 1);
|
||||
return window.pb.protos.InputFrameDecoded.create({
|
||||
dx: mappedDirection[0],
|
||||
dy: mappedDirection[1],
|
||||
btnALevel: btnALevel,
|
||||
btnBLevel: btnBLevel,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@@ -1209,6 +1209,7 @@ $root.protos = (function() {
|
||||
* @property {number|null} [hp] PlayerDownsync hp
|
||||
* @property {number|null} [maxHp] PlayerDownsync maxHp
|
||||
* @property {number|null} [characterState] PlayerDownsync characterState
|
||||
* @property {boolean|null} [inAir] PlayerDownsync inAir
|
||||
* @property {string|null} [name] PlayerDownsync name
|
||||
* @property {string|null} [displayName] PlayerDownsync displayName
|
||||
* @property {string|null} [avatar] PlayerDownsync avatar
|
||||
@@ -1373,6 +1374,14 @@ $root.protos = (function() {
|
||||
*/
|
||||
PlayerDownsync.prototype.characterState = 0;
|
||||
|
||||
/**
|
||||
* PlayerDownsync inAir.
|
||||
* @member {boolean} inAir
|
||||
* @memberof protos.PlayerDownsync
|
||||
* @instance
|
||||
*/
|
||||
PlayerDownsync.prototype.inAir = false;
|
||||
|
||||
/**
|
||||
* PlayerDownsync name.
|
||||
* @member {string} name
|
||||
@@ -1457,12 +1466,14 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 17, wireType 0 =*/136).int32(message.maxHp);
|
||||
if (message.characterState != null && Object.hasOwnProperty.call(message, "characterState"))
|
||||
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.name != null && Object.hasOwnProperty.call(message, "name"))
|
||||
writer.uint32(/* id 19, wireType 2 =*/154).string(message.name);
|
||||
writer.uint32(/* id 20, wireType 2 =*/162).string(message.name);
|
||||
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
|
||||
writer.uint32(/* id 20, wireType 2 =*/162).string(message.displayName);
|
||||
writer.uint32(/* id 21, wireType 2 =*/170).string(message.displayName);
|
||||
if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
|
||||
writer.uint32(/* id 21, wireType 2 =*/170).string(message.avatar);
|
||||
writer.uint32(/* id 22, wireType 2 =*/178).string(message.avatar);
|
||||
return writer;
|
||||
};
|
||||
|
||||
@@ -1570,14 +1581,18 @@ $root.protos = (function() {
|
||||
break;
|
||||
}
|
||||
case 19: {
|
||||
message.name = reader.string();
|
||||
message.inAir = reader.bool();
|
||||
break;
|
||||
}
|
||||
case 20: {
|
||||
message.displayName = reader.string();
|
||||
message.name = reader.string();
|
||||
break;
|
||||
}
|
||||
case 21: {
|
||||
message.displayName = reader.string();
|
||||
break;
|
||||
}
|
||||
case 22: {
|
||||
message.avatar = reader.string();
|
||||
break;
|
||||
}
|
||||
@@ -1670,6 +1685,9 @@ $root.protos = (function() {
|
||||
if (message.characterState != null && message.hasOwnProperty("characterState"))
|
||||
if (!$util.isInteger(message.characterState))
|
||||
return "characterState: integer expected";
|
||||
if (message.inAir != null && message.hasOwnProperty("inAir"))
|
||||
if (typeof message.inAir !== "boolean")
|
||||
return "inAir: boolean expected";
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
if (!$util.isString(message.name))
|
||||
return "name: string expected";
|
||||
@@ -1730,6 +1748,8 @@ $root.protos = (function() {
|
||||
message.maxHp = object.maxHp | 0;
|
||||
if (object.characterState != null)
|
||||
message.characterState = object.characterState | 0;
|
||||
if (object.inAir != null)
|
||||
message.inAir = Boolean(object.inAir);
|
||||
if (object.name != null)
|
||||
message.name = String(object.name);
|
||||
if (object.displayName != null)
|
||||
@@ -1771,6 +1791,7 @@ $root.protos = (function() {
|
||||
object.hp = 0;
|
||||
object.maxHp = 0;
|
||||
object.characterState = 0;
|
||||
object.inAir = false;
|
||||
object.name = "";
|
||||
object.displayName = "";
|
||||
object.avatar = "";
|
||||
@@ -1811,6 +1832,8 @@ $root.protos = (function() {
|
||||
object.maxHp = message.maxHp;
|
||||
if (message.characterState != null && message.hasOwnProperty("characterState"))
|
||||
object.characterState = message.characterState;
|
||||
if (message.inAir != null && message.hasOwnProperty("inAir"))
|
||||
object.inAir = message.inAir;
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
object.name = message.name;
|
||||
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
||||
@@ -1858,6 +1881,7 @@ $root.protos = (function() {
|
||||
* @property {number|null} [dx] InputFrameDecoded dx
|
||||
* @property {number|null} [dy] InputFrameDecoded dy
|
||||
* @property {number|null} [btnALevel] InputFrameDecoded btnALevel
|
||||
* @property {number|null} [btnBLevel] InputFrameDecoded btnBLevel
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -1899,6 +1923,14 @@ $root.protos = (function() {
|
||||
*/
|
||||
InputFrameDecoded.prototype.btnALevel = 0;
|
||||
|
||||
/**
|
||||
* InputFrameDecoded btnBLevel.
|
||||
* @member {number} btnBLevel
|
||||
* @memberof protos.InputFrameDecoded
|
||||
* @instance
|
||||
*/
|
||||
InputFrameDecoded.prototype.btnBLevel = 0;
|
||||
|
||||
/**
|
||||
* Creates a new InputFrameDecoded instance using the specified properties.
|
||||
* @function create
|
||||
@@ -1929,6 +1961,8 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dy);
|
||||
if (message.btnALevel != null && Object.hasOwnProperty.call(message, "btnALevel"))
|
||||
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.btnALevel);
|
||||
if (message.btnBLevel != null && Object.hasOwnProperty.call(message, "btnBLevel"))
|
||||
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.btnBLevel);
|
||||
return writer;
|
||||
};
|
||||
|
||||
@@ -1975,6 +2009,10 @@ $root.protos = (function() {
|
||||
message.btnALevel = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
message.btnBLevel = reader.int32();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
@@ -2019,6 +2057,9 @@ $root.protos = (function() {
|
||||
if (message.btnALevel != null && message.hasOwnProperty("btnALevel"))
|
||||
if (!$util.isInteger(message.btnALevel))
|
||||
return "btnALevel: integer expected";
|
||||
if (message.btnBLevel != null && message.hasOwnProperty("btnBLevel"))
|
||||
if (!$util.isInteger(message.btnBLevel))
|
||||
return "btnBLevel: integer expected";
|
||||
return null;
|
||||
};
|
||||
|
||||
@@ -2040,6 +2081,8 @@ $root.protos = (function() {
|
||||
message.dy = object.dy | 0;
|
||||
if (object.btnALevel != null)
|
||||
message.btnALevel = object.btnALevel | 0;
|
||||
if (object.btnBLevel != null)
|
||||
message.btnBLevel = object.btnBLevel | 0;
|
||||
return message;
|
||||
};
|
||||
|
||||
@@ -2060,6 +2103,7 @@ $root.protos = (function() {
|
||||
object.dx = 0;
|
||||
object.dy = 0;
|
||||
object.btnALevel = 0;
|
||||
object.btnBLevel = 0;
|
||||
}
|
||||
if (message.dx != null && message.hasOwnProperty("dx"))
|
||||
object.dx = message.dx;
|
||||
@@ -2067,6 +2111,8 @@ $root.protos = (function() {
|
||||
object.dy = message.dy;
|
||||
if (message.btnALevel != null && message.hasOwnProperty("btnALevel"))
|
||||
object.btnALevel = message.btnALevel;
|
||||
if (message.btnBLevel != null && message.hasOwnProperty("btnBLevel"))
|
||||
object.btnBLevel = message.btnBLevel;
|
||||
return object;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user