private IEnumerator CreateTorpedoCutIn(UniRx.IObserver <bool> observer) { BattleCutInEffectCamera cam = BattleTaskManager.GetBattleCameras().cutInEffectCamera; UITexture centerLine = ((Component)cam.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>(); if (centerLine != null) { centerLine.alpha = 0f; } _prodTorpedoCutIn = ProdTorpedoCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdTorpedoCutIn).GetComponent <ProdTorpedoCutIn>(), _clsRaigeki, cam.transform); BattleTaskManager.GetBattleCameras().enemyFieldCamera.cullingMask = BattleTaskManager.GetBattleCameras().GetDefaultLayers(); yield return(new WaitForEndOfFrame()); prefabProdTorpedoStraight = (UnityEngine.Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabTorpedoStraightController, Vector3.zero, Quaternion.identity) as Transform); Transform transP4 = new GameObject().transform; transP4.name = "ProdTorpedoSalvoPhase2"; _prodTorpedoSalvoPhase2 = new ProdTorpedoSalvoPhase2(transP4, ((Component)prefabProdTorpedoStraight).GetComponent <TorpedoStraightController>()); _prodTorpedoSalvoPhase2.Initialize(_clsRaigeki, TorpedoParticle, centerLine); yield return(new WaitForEndOfFrame()); Transform transP3 = new GameObject().transform; transP3.name = "ProdTorpedoSalvoPhase3"; _prodTorpedoSalvoPhase3 = new ProdTorpedoSalvoPhase3(transP3); _prodTorpedoSalvoPhase3.Initialize(_clsRaigeki, TorpedoParticle); yield return(new WaitForEndOfFrame()); _prodTorpedoSalvoPhase3.SetHpGauge(); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }
private IEnumerator CreateTorpedoPhase2(UniRx.IObserver <bool> observer) { Transform torpedoStraight = UnityEngine.Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabTorpedoStraightController, Vector3.zero, Quaternion.identity) as Transform; Transform trams = new GameObject().transform; trams.name = "ProdTorpedoSalvoPhase2"; _prodTorpedoSalvoPhase2 = new ProdTorpedoSalvoPhase2(trams, ((Component)torpedoStraight).GetComponent <TorpedoStraightController>()); _prodTorpedoSalvoPhase2.Initialize(_clsRaigeki, TorpedoParticle, CenterLine); yield return(new WaitForEndOfFrame()); observer.OnNext(value: true); observer.OnCompleted(); }