mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 16:46:38 +00:00
Updates for fireball bullet.
This commit is contained in:
File diff suppressed because one or more lines are too long
7
frontend/assets/resources/animation/Fireball.meta
Normal file
7
frontend/assets/resources/animation/Fireball.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "b07a911d-2d61-486d-9edc-1b3ba53c9911",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
145
frontend/assets/resources/animation/Fireball/Fireball1.anim
Normal file
145
frontend/assets/resources/animation/Fireball/Fireball1.anim
Normal file
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.35,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "dbe67025-9878-4e13-8f3d-81e04734810a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "e92702d5-d5fd-49e6-ab6b-2296b43fa6d6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e1a89340-0b92-4e6b-93f2-e983302d70ce"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "b0bb4a7a-4ae3-48fc-9913-3b6d1d36c56f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b44d585b-8e18-4767-b263-ed3a53cd3250"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a87a9ea8-2d84-4a3b-83e3-a4d7b8ac96b8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "a1604f9d-c0ea-4f92-b09b-3608245bda8e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "4372818f-1e44-4180-a0ce-4a34cee4fc5b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "2ad9becb-20e0-4bbb-b83b-de21e085e706"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "5d867617-7f50-4fa8-804d-ce28c47ea407"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "824c9bee-42b7-4a94-86f8-6356f11aee16"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "6389164e-93bb-4d4d-9740-5e2d5cdb1029"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "d184a083-6043-4ca6-bd14-8db1b6be1d2e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "361b1722-e362-46e5-939e-e2d1666df374"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "662fbe4f-a1f4-46f7-83e4-eafd021432da"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "5e509118-a44b-4e7f-9686-c6bb0b30f0b0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "bc1110c7-4423-4c43-965c-0cb3dd8e31ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "33cc8d11-1568-47a7-b4f1-cef4888302e5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "83bb5dd3-510c-4fce-b393-840f14efb8cd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "1db706f5-366a-421c-843f-a4bb016f80ec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "41a4f35a-01c0-4a22-b5cc-7bfe25ed4501"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "ba12416b-eec3-4260-8402-7fc25b125624",
|
||||
"subMetas": {}
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
"_name": "InAirIdle1ByJump",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.7833333333333333,
|
||||
"_duration": 0.5833333333333334,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
@@ -18,67 +18,67 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "06d18871-0cb6-41eb-a484-5c6a4c04d5d5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f298ff82-ad9d-4945-ab19-14c3e3d54c95"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "bb5924a6-40cf-4e43-8c94-e51b27861656"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "fc4b5181-77af-44ec-836e-c14eec8d20c4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "5ddd3db3-79b2-4f0c-bb76-2446801ff665"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "032785ce-c911-479b-be1c-2e0899a586d0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "d651269d-1c08-49f8-bc38-d301bf26b0e1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5666666666666667,
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "e270563e-d98d-4a80-82db-837183053ae3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6333333333333333,
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "aec31ef8-46dc-4f0e-9cba-18f6c96c5c33"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7,
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "e64b3a8d-41a9-45f6-9aeb-9e49b6317080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7666666666666667,
|
||||
"frame": 0.5666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "cf886091-24a9-4cfb-8cb9-e3db977035ab"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 259 KiB |
@@ -32,6 +32,8 @@ message PlayerDownsync {
|
||||
int32 bulletTeamId = 24;
|
||||
int32 chCollisionTeamId = 25;
|
||||
|
||||
bool onWall = 26; // like "inAir", it’s by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "onWall (prev -> curr)"
|
||||
|
||||
string name = 997;
|
||||
string displayName = 998;
|
||||
string avatar = 999;
|
||||
@@ -146,6 +148,7 @@ message FireballBullet {
|
||||
int32 teamId = 19;
|
||||
|
||||
int32 bulletLocalId = 20;
|
||||
int32 speciesId = 21;
|
||||
|
||||
int32 virtualGridX = 999;
|
||||
int32 virtualGridY = 1000;
|
||||
|
@@ -31,13 +31,10 @@
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 22
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 24
|
||||
"__id__": 23
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
@@ -869,32 +866,6 @@
|
||||
"fileId": "7aN7Gcc/tBw5EGlTJVBj2+",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "b74b05YDqZFRo4OkZRFZX8k",
|
||||
"_name": "",
|
||||
|
224
frontend/assets/resources/prefabs/Fireball.prefab
Normal file
224
frontend/assets/resources/prefabs/Fireball.prefab
Normal file
@@ -0,0 +1,224 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Root",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 120,
|
||||
"height": 120
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 2,
|
||||
"groupIndex": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Fireball1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 4
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_defaultClip": null,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "ba12416b-eec3-4260-8402-7fc25b125624"
|
||||
}
|
||||
],
|
||||
"playOnLoad": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "6dcd5722-8ef9-47fd-9520-861d2713e274"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "d92d4831-cd65-4eb5-90bd-b77021aec35b"
|
||||
},
|
||||
"fileId": "9ds3kDxvVFFqyr760jrV4a",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "e66a2qRmRZGnqSyVMwLy6Pw",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "d92d4831-cd65-4eb5-90bd-b77021aec35b"
|
||||
},
|
||||
"fileId": "4cx75uwJJFa7U8QL187QCL",
|
||||
"sync": false
|
||||
}
|
||||
]
|
8
frontend/assets/resources/prefabs/Fireball.prefab.meta
Normal file
8
frontend/assets/resources/prefabs/Fireball.prefab.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"ver": "1.2.5",
|
||||
"uuid": "d92d4831-cd65-4eb5-90bd-b77021aec35b",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
@@ -440,7 +440,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.3490857485811,
|
||||
209.57814771583418,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@@ -262,6 +262,9 @@
|
||||
"controlledCharacterPrefab": {
|
||||
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
|
||||
},
|
||||
"fireballPrefab": {
|
||||
"__uuid__": "d92d4831-cd65-4eb5-90bd-b77021aec35b"
|
||||
},
|
||||
"joystickInputControllerNode": {
|
||||
"__id__": 7
|
||||
},
|
||||
@@ -461,7 +464,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
215.64032554232523,
|
||||
210.49935741157617,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
26
frontend/assets/scripts/Fireball.js
Normal file
26
frontend/assets/scripts/Fireball.js
Normal file
@@ -0,0 +1,26 @@
|
||||
cc.Class({
|
||||
extends: cc.Component,
|
||||
|
||||
ctor() {
|
||||
this.lastUsed = -1;
|
||||
this.bulletLocalId = -1;
|
||||
this.speciesName = null;
|
||||
},
|
||||
|
||||
setSpecies(speciesName) {
|
||||
if (speciesName == this.speciesName) return;
|
||||
this.speciesName = speciesName;
|
||||
this.effAnimNode = this.node.getChildByName(this.speciesName);
|
||||
this.animComp = this.effAnimNode.getComponent(cc.Animation);
|
||||
this.effAnimNode.active = true;
|
||||
for (let k in this.children) {
|
||||
const child = this.children[k];
|
||||
if (!child.active) continue;
|
||||
if (child == effAnimNode || child.name == speciesName) continue;
|
||||
child.active = false;
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
},
|
||||
});
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "247b7613-6c6e-4f01-b1d6-5f8f041b5688",
|
||||
"uuid": "e66a2a91-9916-469e-a4b2-54cc0bcba3f0",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
@@ -2,6 +2,7 @@ const i18n = require('LanguageData');
|
||||
i18n.init(window.language); // languageID should be equal to the one we input in New Language ID input field
|
||||
|
||||
const RingBuffer = require('./RingBuffer');
|
||||
const PriorityQueue = require("./PriorityQueue");
|
||||
|
||||
window.ALL_MAP_STATES = {
|
||||
VISUAL: 0, // For free dragging & zooming.
|
||||
@@ -44,6 +45,10 @@ cc.Class({
|
||||
type: cc.Prefab,
|
||||
default: null,
|
||||
},
|
||||
fireballPrefab: {
|
||||
type: cc.Prefab,
|
||||
default: null,
|
||||
},
|
||||
joystickInputControllerNode: {
|
||||
type: cc.Node,
|
||||
default: null
|
||||
@@ -287,6 +292,30 @@ cc.Class({
|
||||
self.playerRichInfoDict = new Map();
|
||||
// Clearing previous info of all players. [ENDS]
|
||||
|
||||
// Clearing cached fireball rendering nodes [BEGINS]
|
||||
if (null != self.cachedFireballs) {
|
||||
while (!self.cachedFireballs.isEmpty()) {
|
||||
const v = self.cachedFireballs.pop();
|
||||
if (v && v.node && v.node.parent) {
|
||||
v.node.parent.removeChild(v.node);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self.cachedFireballs = new PriorityQueue();
|
||||
}
|
||||
for (let k = 0; k < 1000; k++) {
|
||||
const newFireballNode = cc.instantiate(self.fireballPrefab);
|
||||
const newFireball = newFireballNode.getComponent("Fireball");
|
||||
newFireballNode.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
|
||||
safelyAddChild(self.node, newFireballNode);
|
||||
setLocalZOrder(newFireballNode, 5);
|
||||
newFireball.lastUsed = -1;
|
||||
newFireball.bulletLocalId = -1;
|
||||
const initLookupKey = -(k + 1); // there's definitely no suck "bulletLocalId"
|
||||
self.cachedFireballs.push(newFireball.lastUsed, newFireball, initLookupKey);
|
||||
}
|
||||
// Clearing cached fireball rendering nodes [ENDS]
|
||||
|
||||
self.renderFrameId = 0; // After battle started
|
||||
self.bulletBattleLocalIdCounter = 0;
|
||||
self.lastAllConfirmedInputFrameId = -1;
|
||||
@@ -590,7 +619,7 @@ cc.Class({
|
||||
const jsFireballBulletsArr = new Array(pbRdf.fireballBullets.length).fill(null);
|
||||
for (let k = 0; k < pbRdf.fireballBullets.length; ++k) {
|
||||
const pbBullet = pbRdf.fireballBullets[k];
|
||||
const jsFireballBullet = gopkgs.NewFireballBulletJs(pbBullet.bulletLocalId, pbBullet.originatedRenderFrameId, pbBullet.offenderJoinIndex, pbBullet.startupFrames, pbBullet.cancellableStFrame, pbBullet.cancellableEdFrame, pbBullet.activeFrames, pbBullet.hitStunFrames, pbBullet.blockStunFrames, pbBullet.pushbackVelX, pbBullet.pushbackVelY, pbBullet.damage, pbBullet.selfLockVelX, pbBullet.selfLockVelY, pbBullet.hitboxOffsetX, pbBullet.hitboxOffsetY, pbBullet.hitboxSizeX, pbBullet.hitboxSizeY, pbBullet.blowUp, pbBullet.teamId, pbBullet.virtualGridX, pbBullet.virtualGridY, pbBullet.dirX, pbBullet.dirY, pbBullet.velX, pbBullet.velY, pbBullet.speed);
|
||||
const jsFireballBullet = gopkgs.NewFireballBulletJs(pbBullet.bulletLocalId, pbBullet.originatedRenderFrameId, pbBullet.offenderJoinIndex, pbBullet.startupFrames, pbBullet.cancellableStFrame, pbBullet.cancellableEdFrame, pbBullet.activeFrames, pbBullet.hitStunFrames, pbBullet.blockStunFrames, pbBullet.pushbackVelX, pbBullet.pushbackVelY, pbBullet.damage, pbBullet.selfLockVelX, pbBullet.selfLockVelY, pbBullet.hitboxOffsetX, pbBullet.hitboxOffsetY, pbBullet.hitboxSizeX, pbBullet.hitboxSizeY, pbBullet.blowUp, pbBullet.teamId, pbBullet.virtualGridX, pbBullet.virtualGridY, pbBullet.dirX, pbBullet.dirY, pbBullet.velX, pbBullet.velY, pbBullet.speed, pbBullet.speciesId);
|
||||
jsFireballBulletsArr[k] = jsFireballBullet;
|
||||
}
|
||||
|
||||
@@ -709,10 +738,9 @@ cc.Class({
|
||||
|
||||
equalMeleeBullets(lhs, rhs) {
|
||||
if (null == lhs || null == rhs) return false;
|
||||
if (lhs.battleLocalId != rhs.battleLocalId) return false;
|
||||
if (lhs.offenderPlayerId != rhs.offenderPlayerId) return false;
|
||||
if (lhs.offenderJoinIndex != rhs.offenderJoinIndex) return false;
|
||||
if (lhs.originatedRenderFrameId != rhs.originatedRenderFrameId) return false;
|
||||
if (lhs.BulletLocalId != rhs.BulletLocalId) return false;
|
||||
if (lhs.OffenderJoinIndex != rhs.OffenderJoinIndex) return false;
|
||||
if (lhs.OriginatedRenderFrameId != rhs.OriginatedRenderFrameId) return false;
|
||||
return true;
|
||||
},
|
||||
|
||||
@@ -1039,6 +1067,27 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
}
|
||||
},
|
||||
|
||||
_renderFireballBullet(fireballBullet) {
|
||||
const self = this;
|
||||
let pqNode = self.cachedFireballs.popAny(fireballBullet.Bullet.BulletLocalId);
|
||||
const speciesName = `Fireball${fireballBullet.SpeciesId}`;
|
||||
|
||||
if (null == pqNode) {
|
||||
pqNode = self.cachedFireballs.pop();
|
||||
} else {
|
||||
console.log(`Using a cached fireball node for rendering for bulletLocalId=${fireballBullet.Bullet.BulletLocalId}`);
|
||||
}
|
||||
const cachedFireball = pqNode.value;
|
||||
cachedFireball.setSpecies(speciesName);
|
||||
cachedFireball.lastUsed = self.renderFrameId;
|
||||
cachedFireball.bulletLocalId = fireballBullet.Bullet.BulletLocalId;
|
||||
|
||||
const [wx, wy] = gopkgs.VirtualGridToWorldPos(fireballBullet.VirtualGridX, fireballBullet.VirtualGridY);
|
||||
cachedFireball.node.setPosition(cc.v2(wx, wy));
|
||||
|
||||
self.cachedFireballs.push(cachedFireball.lastUsed, cachedFireball, cachedFireball.bulletLocalId);
|
||||
},
|
||||
|
||||
applyRoomDownsyncFrameDynamics(rdf, prevRdf) {
|
||||
const self = this;
|
||||
const playersArr = rdf.PlayersArr;
|
||||
@@ -1053,6 +1102,18 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
playerRichInfo.scriptIns.updateCharacterAnim(currPlayerDownsync, prevRdfPlayer, false, chConfig);
|
||||
}
|
||||
|
||||
// Move all to infinitely far away first
|
||||
for (let k in self.cachedFireballs.list) {
|
||||
const pqNode = self.cachedFireballs.list[k];
|
||||
const fireball = pqNode.value;
|
||||
fireball.node.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
|
||||
}
|
||||
const fireballBullets = rdf.FireballBullets;
|
||||
for (let k in fireballBullets) {
|
||||
const fireballBullet = fireballBullets[k];
|
||||
self._renderFireballBullet(fireballBullet);
|
||||
}
|
||||
|
||||
// Update countdown
|
||||
self.countdownNanos = self.battleDurationNanos - self.renderFrameId * self.rollbackEstimatedDtNanos;
|
||||
if (self.countdownNanos <= 0) {
|
||||
|
@@ -12,32 +12,15 @@ var BinaryHeap = function (customCompare) {
|
||||
* @private
|
||||
*/
|
||||
this.list = [];
|
||||
this.lookupKeyToIndex = {};
|
||||
|
||||
if (customCompare) {
|
||||
this.compare = customCompare;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Builds a heap with the provided keys and values, this will discard the
|
||||
* heap's current data.
|
||||
*
|
||||
* @param {Array} keys An array of keys.
|
||||
* @param {Array} values An array of values. This must be the same size as the
|
||||
* key array.
|
||||
*/
|
||||
BinaryHeap.prototype.buildHeap = function (keys, values) {
|
||||
if (typeof values !== 'undefined' && values.length !== keys.length) {
|
||||
throw new Error('Key array must be the same length as value array');
|
||||
}
|
||||
|
||||
var nodeArray = [];
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
nodeArray.push(new Node(keys[i], values ? values[i] : undefined));
|
||||
}
|
||||
|
||||
buildHeapFromNodeArray(this, nodeArray);
|
||||
BinaryHeap.prototype.contains = function (lookupKey) {
|
||||
return null != this.lookupKeyToIndex[lookupKey];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -45,6 +28,7 @@ BinaryHeap.prototype.buildHeap = function (keys, values) {
|
||||
*/
|
||||
BinaryHeap.prototype.clear = function () {
|
||||
this.list.length = 0;
|
||||
this.lookupKeyToIndex = null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -53,15 +37,20 @@ BinaryHeap.prototype.clear = function () {
|
||||
* @return {Node} node The heap's minimum node or undefined if the heap is
|
||||
* empty.
|
||||
*/
|
||||
BinaryHeap.prototype.extractMinimum = function () {
|
||||
if (!this.list.length) {
|
||||
return undefined;
|
||||
BinaryHeap.prototype.pop = function () {
|
||||
if (0 == this.list.length) {
|
||||
return null;
|
||||
}
|
||||
if (this.list.length === 1) {
|
||||
if (1 == this.list.length) {
|
||||
delete this.lookupKeyToIndex[Object.keys(this.lookupKeyToIndex)[0]];
|
||||
return this.list.shift();
|
||||
}
|
||||
var min = this.list[0];
|
||||
delete this.lookupKeyToIndex[min.lookupKey];
|
||||
|
||||
this.list[0] = this.list.pop();
|
||||
this.lookupKeyToIndex[this.list[0].lookupKey] = 0;
|
||||
|
||||
heapify(this, 0);
|
||||
return min;
|
||||
};
|
||||
@@ -72,8 +61,8 @@ BinaryHeap.prototype.extractMinimum = function () {
|
||||
* @return {Node} node The heap's minimum node or undefined if the heap is
|
||||
* empty.
|
||||
*/
|
||||
BinaryHeap.prototype.findMinimum = function () {
|
||||
return this.isEmpty() ? undefined : this.list[0];
|
||||
BinaryHeap.prototype.top = function () {
|
||||
return this.isEmpty() ? null : this.list[0];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -83,25 +72,79 @@ BinaryHeap.prototype.findMinimum = function () {
|
||||
* @param {Object} value The value to insert.
|
||||
* @return {Node} node The inserted node.
|
||||
*/
|
||||
BinaryHeap.prototype.insert = function (key, value) {
|
||||
BinaryHeap.prototype.push = function (key, value, lookupKey) {
|
||||
var i = this.list.length;
|
||||
var node = new Node(key, value);
|
||||
var node = new Node(key, value, lookupKey);
|
||||
this.list.push(node);
|
||||
var parent = getParent(i);
|
||||
while (typeof parent !== 'undefined' &&
|
||||
this.compare(this.list[i], this.list[parent]) < 0) {
|
||||
swap(this.list, i, parent);
|
||||
i = parent;
|
||||
parent = getParent(i);
|
||||
this.lookupKeyToIndex[lookupKey] = i;
|
||||
let u = getParent(i);
|
||||
while (null != u && this.compare(this.list[i], this.list[u]) < 0) {
|
||||
swap(this.list, i, u, this.lookupKeyToIndex);
|
||||
i = u;
|
||||
u = getParent(i);
|
||||
}
|
||||
return node;
|
||||
};
|
||||
|
||||
BinaryHeap.prototype.update = function (lookupKey, newKey, newValue) {
|
||||
if (null == this.lookupKeyToIndex[lookupKey]) return null;
|
||||
var i = this.lookupKeyToIndex[lookupKey];
|
||||
|
||||
this.list[i].key = newKey;
|
||||
this.list[i].value = newValue;
|
||||
|
||||
let u = getParent(i);
|
||||
if (null != u && this.compare(this.list[i], this.list[u]) < 0) {
|
||||
while (null != u && this.compare(this.list[i], this.list[u]) < 0) {
|
||||
swap(this.list, i, u, this.lookupKeyToIndex);
|
||||
i = u;
|
||||
u = getParent(i);
|
||||
}
|
||||
} else {
|
||||
heapify(this, i);
|
||||
}
|
||||
};
|
||||
|
||||
BinaryHeap.prototype.popAny = function (lookupKey) {
|
||||
if (null == this.lookupKeyToIndex[lookupKey]) return null;
|
||||
|
||||
if (0 == this.list.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (1 == this.list.length) {
|
||||
delete this.lookupKeyToIndex[Object.keys(this.lookupKeyToIndex)[0]];
|
||||
return this.list.shift();
|
||||
}
|
||||
|
||||
var i = this.lookupKeyToIndex[lookupKey];
|
||||
|
||||
|
||||
var old = this.list[i];
|
||||
delete this.lookupKeyToIndex[old.lookupKey];
|
||||
|
||||
this.list[i] = this.list.pop();
|
||||
this.lookupKeyToIndex[this.list[i].lookupKey] = i;
|
||||
|
||||
let u = getParent(i);
|
||||
if (null != u && this.compare(this.list[i], this.list[u]) < 0) {
|
||||
while (null != u && this.compare(this.list[i], this.list[u]) < 0) {
|
||||
swap(this.list, i, u, this.lookupKeyToIndex);
|
||||
i = u;
|
||||
u = getParent(i);
|
||||
}
|
||||
} else {
|
||||
heapify(this, i);
|
||||
}
|
||||
|
||||
return old;
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean} Whether the heap is empty.
|
||||
*/
|
||||
BinaryHeap.prototype.isEmpty = function () {
|
||||
return !this.list.length;
|
||||
return 0 == this.list.length;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -111,16 +154,6 @@ BinaryHeap.prototype.size = function () {
|
||||
return this.list.length;
|
||||
};
|
||||
|
||||
/**
|
||||
* Joins another heap to this one.
|
||||
*
|
||||
* @param {BinaryHeap} otherHeap The other heap.
|
||||
*/
|
||||
BinaryHeap.prototype.union = function (otherHeap) {
|
||||
var array = this.list.concat(otherHeap.list);
|
||||
buildHeapFromNodeArray(this, array);
|
||||
};
|
||||
|
||||
/**
|
||||
* Compares two nodes with each other.
|
||||
*
|
||||
@@ -147,34 +180,27 @@ BinaryHeap.prototype.compare = function (a, b) {
|
||||
* @param {number} i The index of the node to heapify.
|
||||
*/
|
||||
function heapify(heap, i) {
|
||||
var l = getLeft(i);
|
||||
var r = getRight(i);
|
||||
var smallest = i;
|
||||
if (l < heap.list.length &&
|
||||
heap.compare(heap.list[l], heap.list[i]) < 0) {
|
||||
smallest = l;
|
||||
}
|
||||
if (r < heap.list.length &&
|
||||
heap.compare(heap.list[r], heap.list[smallest]) < 0) {
|
||||
smallest = r;
|
||||
}
|
||||
if (smallest !== i) {
|
||||
swap(heap.list, i, smallest);
|
||||
heapify(heap, smallest);
|
||||
}
|
||||
}
|
||||
let cur = i;
|
||||
let smallest = -1;
|
||||
while (cur != smallest) {
|
||||
const l = getLeft(cur);
|
||||
const r = getRight(cur);
|
||||
|
||||
smallest = cur;
|
||||
if (l < heap.list.length &&
|
||||
heap.compare(heap.list[l], heap.list[smallest]) < 0) {
|
||||
smallest = l;
|
||||
}
|
||||
if (r < heap.list.length &&
|
||||
heap.compare(heap.list[r], heap.list[smallest]) < 0) {
|
||||
smallest = r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a heap from a node array, this will discard the heap's current data.
|
||||
*
|
||||
* @private
|
||||
* @param {BinaryHeap} heap The heap to override.
|
||||
* @param {Node[]} nodeArray The array of nodes for the new heap.
|
||||
*/
|
||||
function buildHeapFromNodeArray(heap, nodeArray) {
|
||||
heap.list = nodeArray;
|
||||
for (var i = Math.floor(heap.list.length / 2); i >= 0; i--) {
|
||||
heapify(heap, i);
|
||||
if (smallest !== cur) {
|
||||
swap(heap.list, cur, smallest, heap.lookupKeyToIndex);
|
||||
cur = smallest;
|
||||
smallest = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,10 +212,16 @@ function buildHeapFromNodeArray(heap, nodeArray) {
|
||||
* @param {number} a The index of the first element.
|
||||
* @param {number} b The index of the second element.
|
||||
*/
|
||||
function swap(array, a, b) {
|
||||
function swap(array, a, b, lookupKeyToIndex) {
|
||||
var aLookupKey = array[a].lookupKey;
|
||||
var bLookupKey = array[b].lookupKey;
|
||||
|
||||
var temp = array[a];
|
||||
array[a] = array[b];
|
||||
array[b] = temp;
|
||||
|
||||
lookupKeyToIndex[aLookupKey] = b;
|
||||
lookupKeyToIndex[bLookupKey] = a;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,8 +232,8 @@ function swap(array, a, b) {
|
||||
* @return {number} The index of the node's parent.
|
||||
*/
|
||||
function getParent(i) {
|
||||
if (i === 0) {
|
||||
return undefined;
|
||||
if (0 == i) {
|
||||
return null;
|
||||
}
|
||||
return Math.floor((i - 1) / 2);
|
||||
}
|
||||
@@ -235,9 +267,10 @@ function getRight(i) {
|
||||
* @param {Object} key The key of the new node.
|
||||
* @param {Object} value The value of the new node.
|
||||
*/
|
||||
function Node(key, value) {
|
||||
function Node(key, value, lookupKey) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
this.lookupKey = lookupKey;
|
||||
}
|
||||
|
||||
module.exports = BinaryHeap;
|
9
frontend/assets/scripts/PriorityQueue.js.meta
Normal file
9
frontend/assets/scripts/PriorityQueue.js.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "20a75b4a-e220-42cd-bab4-9fc63a289b3f",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@@ -1216,6 +1216,7 @@ $root.protos = (function() {
|
||||
* @property {number|null} [framesInvinsible] PlayerDownsync framesInvinsible
|
||||
* @property {number|null} [bulletTeamId] PlayerDownsync bulletTeamId
|
||||
* @property {number|null} [chCollisionTeamId] PlayerDownsync chCollisionTeamId
|
||||
* @property {boolean|null} [onWall] PlayerDownsync onWall
|
||||
* @property {string|null} [name] PlayerDownsync name
|
||||
* @property {string|null} [displayName] PlayerDownsync displayName
|
||||
* @property {string|null} [avatar] PlayerDownsync avatar
|
||||
@@ -1436,6 +1437,14 @@ $root.protos = (function() {
|
||||
*/
|
||||
PlayerDownsync.prototype.chCollisionTeamId = 0;
|
||||
|
||||
/**
|
||||
* PlayerDownsync onWall.
|
||||
* @member {boolean} onWall
|
||||
* @memberof protos.PlayerDownsync
|
||||
* @instance
|
||||
*/
|
||||
PlayerDownsync.prototype.onWall = false;
|
||||
|
||||
/**
|
||||
* PlayerDownsync name.
|
||||
* @member {string} name
|
||||
@@ -1534,6 +1543,8 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 24, wireType 0 =*/192).int32(message.bulletTeamId);
|
||||
if (message.chCollisionTeamId != null && Object.hasOwnProperty.call(message, "chCollisionTeamId"))
|
||||
writer.uint32(/* id 25, wireType 0 =*/200).int32(message.chCollisionTeamId);
|
||||
if (message.onWall != null && Object.hasOwnProperty.call(message, "onWall"))
|
||||
writer.uint32(/* id 26, wireType 0 =*/208).bool(message.onWall);
|
||||
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
||||
writer.uint32(/* id 997, wireType 2 =*/7978).string(message.name);
|
||||
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
|
||||
@@ -1674,6 +1685,10 @@ $root.protos = (function() {
|
||||
message.chCollisionTeamId = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
message.onWall = reader.bool();
|
||||
break;
|
||||
}
|
||||
case 997: {
|
||||
message.name = reader.string();
|
||||
break;
|
||||
@@ -1796,6 +1811,9 @@ $root.protos = (function() {
|
||||
if (message.chCollisionTeamId != null && message.hasOwnProperty("chCollisionTeamId"))
|
||||
if (!$util.isInteger(message.chCollisionTeamId))
|
||||
return "chCollisionTeamId: integer expected";
|
||||
if (message.onWall != null && message.hasOwnProperty("onWall"))
|
||||
if (typeof message.onWall !== "boolean")
|
||||
return "onWall: boolean expected";
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
if (!$util.isString(message.name))
|
||||
return "name: string expected";
|
||||
@@ -1870,6 +1888,8 @@ $root.protos = (function() {
|
||||
message.bulletTeamId = object.bulletTeamId | 0;
|
||||
if (object.chCollisionTeamId != null)
|
||||
message.chCollisionTeamId = object.chCollisionTeamId | 0;
|
||||
if (object.onWall != null)
|
||||
message.onWall = Boolean(object.onWall);
|
||||
if (object.name != null)
|
||||
message.name = String(object.name);
|
||||
if (object.displayName != null)
|
||||
@@ -1918,6 +1938,7 @@ $root.protos = (function() {
|
||||
object.framesInvinsible = 0;
|
||||
object.bulletTeamId = 0;
|
||||
object.chCollisionTeamId = 0;
|
||||
object.onWall = false;
|
||||
object.name = "";
|
||||
object.displayName = "";
|
||||
object.avatar = "";
|
||||
@@ -1972,6 +1993,8 @@ $root.protos = (function() {
|
||||
object.bulletTeamId = message.bulletTeamId;
|
||||
if (message.chCollisionTeamId != null && message.hasOwnProperty("chCollisionTeamId"))
|
||||
object.chCollisionTeamId = message.chCollisionTeamId;
|
||||
if (message.onWall != null && message.hasOwnProperty("onWall"))
|
||||
object.onWall = message.onWall;
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
object.name = message.name;
|
||||
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
||||
@@ -4759,6 +4782,7 @@ $root.protos = (function() {
|
||||
* @property {boolean|null} [blowUp] FireballBullet blowUp
|
||||
* @property {number|null} [teamId] FireballBullet teamId
|
||||
* @property {number|null} [bulletLocalId] FireballBullet bulletLocalId
|
||||
* @property {number|null} [speciesId] FireballBullet speciesId
|
||||
* @property {number|null} [virtualGridX] FireballBullet virtualGridX
|
||||
* @property {number|null} [virtualGridY] FireballBullet virtualGridY
|
||||
* @property {number|null} [dirX] FireballBullet dirX
|
||||
@@ -4943,6 +4967,14 @@ $root.protos = (function() {
|
||||
*/
|
||||
FireballBullet.prototype.bulletLocalId = 0;
|
||||
|
||||
/**
|
||||
* FireballBullet speciesId.
|
||||
* @member {number} speciesId
|
||||
* @memberof protos.FireballBullet
|
||||
* @instance
|
||||
*/
|
||||
FireballBullet.prototype.speciesId = 0;
|
||||
|
||||
/**
|
||||
* FireballBullet virtualGridX.
|
||||
* @member {number} virtualGridX
|
||||
@@ -5063,6 +5095,8 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 19, wireType 0 =*/152).int32(message.teamId);
|
||||
if (message.bulletLocalId != null && Object.hasOwnProperty.call(message, "bulletLocalId"))
|
||||
writer.uint32(/* id 20, wireType 0 =*/160).int32(message.bulletLocalId);
|
||||
if (message.speciesId != null && Object.hasOwnProperty.call(message, "speciesId"))
|
||||
writer.uint32(/* id 21, wireType 0 =*/168).int32(message.speciesId);
|
||||
if (message.virtualGridX != null && Object.hasOwnProperty.call(message, "virtualGridX"))
|
||||
writer.uint32(/* id 999, wireType 0 =*/7992).int32(message.virtualGridX);
|
||||
if (message.virtualGridY != null && Object.hasOwnProperty.call(message, "virtualGridY"))
|
||||
@@ -5191,6 +5225,10 @@ $root.protos = (function() {
|
||||
message.bulletLocalId = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 21: {
|
||||
message.speciesId = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 999: {
|
||||
message.virtualGridX = reader.int32();
|
||||
break;
|
||||
@@ -5314,6 +5352,9 @@ $root.protos = (function() {
|
||||
if (message.bulletLocalId != null && message.hasOwnProperty("bulletLocalId"))
|
||||
if (!$util.isInteger(message.bulletLocalId))
|
||||
return "bulletLocalId: integer expected";
|
||||
if (message.speciesId != null && message.hasOwnProperty("speciesId"))
|
||||
if (!$util.isInteger(message.speciesId))
|
||||
return "speciesId: integer expected";
|
||||
if (message.virtualGridX != null && message.hasOwnProperty("virtualGridX"))
|
||||
if (!$util.isInteger(message.virtualGridX))
|
||||
return "virtualGridX: integer expected";
|
||||
@@ -5390,6 +5431,8 @@ $root.protos = (function() {
|
||||
message.teamId = object.teamId | 0;
|
||||
if (object.bulletLocalId != null)
|
||||
message.bulletLocalId = object.bulletLocalId | 0;
|
||||
if (object.speciesId != null)
|
||||
message.speciesId = object.speciesId | 0;
|
||||
if (object.virtualGridX != null)
|
||||
message.virtualGridX = object.virtualGridX | 0;
|
||||
if (object.virtualGridY != null)
|
||||
@@ -5441,6 +5484,7 @@ $root.protos = (function() {
|
||||
object.blowUp = false;
|
||||
object.teamId = 0;
|
||||
object.bulletLocalId = 0;
|
||||
object.speciesId = 0;
|
||||
object.virtualGridX = 0;
|
||||
object.virtualGridY = 0;
|
||||
object.dirX = 0;
|
||||
@@ -5489,6 +5533,8 @@ $root.protos = (function() {
|
||||
object.teamId = message.teamId;
|
||||
if (message.bulletLocalId != null && message.hasOwnProperty("bulletLocalId"))
|
||||
object.bulletLocalId = message.bulletLocalId;
|
||||
if (message.speciesId != null && message.hasOwnProperty("speciesId"))
|
||||
object.speciesId = message.speciesId;
|
||||
if (message.virtualGridX != null && message.hasOwnProperty("virtualGridX"))
|
||||
object.virtualGridX = message.virtualGridX;
|
||||
if (message.virtualGridY != null && message.hasOwnProperty("virtualGridY"))
|
||||
|
Reference in New Issue
Block a user