diff --git a/examples/cocos-creator-multiplayer/frontend/assets/3d/javelin/Materials_javelin01/Material #6.mtl b/examples/cocos-creator-multiplayer/frontend/assets/3d/javelin/Materials_javelin01/Material #6.mtl index d3ed79a..2609551 100644 --- a/examples/cocos-creator-multiplayer/frontend/assets/3d/javelin/Materials_javelin01/Material #6.mtl +++ b/examples/cocos-creator-multiplayer/frontend/assets/3d/javelin/Materials_javelin01/Material #6.mtl @@ -10,6 +10,7 @@ "_techIdx": 0, "_defines": [ { + "USE_INSTANCING": true, "USE_TEXTURE": true } ], diff --git a/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Arrow/Arrow.ts b/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Arrow/Arrow.ts index cad1271..2d4638c 100644 --- a/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Arrow/Arrow.ts +++ b/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Arrow/Arrow.ts @@ -40,10 +40,23 @@ export class Arrow extends Component { this._updatePosAndForward(percent); if (percent >= 1) { - this.node.removeFromParent(); + this.remove(); } } + private _isRemoved = false; + remove() { + if (this._isRemoved) { + return; + } + this._isRemoved = true; + + // 落地 1 秒后消失 + this.scheduleOnce(() => { + this.node.removeFromParent() + }, 1) + } + private _updatePosAndForward(percent: number) { let nextPos = this._getPos(percent); this.node.position = nextPos; diff --git a/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Player/Player.prefab b/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Player/Player.prefab index 8af4529..40cbb8f 100644 --- a/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Player/Player.prefab +++ b/examples/cocos-creator-multiplayer/frontend/assets/prefabs/Player/Player.prefab @@ -216,7 +216,7 @@ "propertyPath": [ "_useBakedAnimation" ], - "value": false + "value": true }, { "__type__": "cc.TargetInfo",