/// <summary> /// 技能隐身 /// </summary> protected void HideModel(bool _hide) { if (_hide) { if (rendererCtrl != null) { rendererCtrl.Show(false, true); } } else { if (rendererCtrl != null) { rendererCtrl.Show(true); } } }
IEnumerator CreateAsync(System.Action <PreviewEntourage> _callback = null) { if (isDummy_ == false) { GameSys.LogError("You can only start create other player in dummy: " + actorInfo.ServerInstanceID); yield break; } // isDownloading_ = true; //判断是否正在下载,防止重复创建 PreviewEntourage opc = null; SmartActorRendererCtrl myRendererCtrl = null; bool faild = false; pendingDownload = Create(actorInfo, delegate(PreviewEntourage _opc, EResult _result) { if (_result != EResult.Success) { faild = true; return; } opc = _opc; pendingDownload = null; myRendererCtrl = opc.gameObject.GetComponentInChildrenFast <SmartActorRendererCtrl>(); myRendererCtrl.Show(false); }); if (mutualExclusion) { GameCenter.previewManager.PushDownLoadTask(pendingDownload); } while (opc == null || opc.inited == false) { if (faild) { yield break; } yield return(null); } if (mutualExclusion) { GameCenter.previewManager.EndDownLoadTask(pendingDownload); } pendingDownload = null; isDownloading_ = false; if (_callback != null) { _callback(opc); } }
IEnumerator CreateAsync(System.Action _callback = null) { if (isDummy_ == false) { Debug.LogError("You can only start create other player in dummy: " + actorInfo.ServerInstanceID); yield break; } // isDownloading_ = true; //判断是否正在下载,防止重复创建 OtherEntourage opc = null; SmartActorRendererCtrl myRendererCtrl = null; bool faild = false; pendingDownload = Create(actorInfo, delegate(OtherEntourage _opc, EResult _result) { if (_result != EResult.Success) { faild = true; return; } opc = _opc; pendingDownload = null; myRendererCtrl = opc.gameObject.GetComponentInChildrenFast <SmartActorRendererCtrl>(); myRendererCtrl.Show(false); }); while (opc == null || opc.inited == false) { if (faild) { yield break; } yield return(null); } pendingDownload = null; isDownloading_ = false; if (!actorInfo.IsAlive) { opc.Dead(true); } if (_callback != null) { _callback(); } }