Example #1
0
        private IEnumerator CreateTorpedo2(IObserver <bool> observer)
        {
            Transform trams = new GameObject().transform;

            trams.name            = "ProdSupportTorpedoPhase2";
            _prodSupportTorpedoP2 = new ProdSupportTorpedoP2(trams);
            _prodSupportTorpedoP2.Initialize(_clsTorpedo, TorpedoParticle);
            yield return(new WaitForEndOfFrame());

            _prodSupportTorpedoP2.CreateHpGauge(FleetType.Enemy);
            yield return(new WaitForEndOfFrame());

            observer.OnNext(value: true);
            observer.OnCompleted();
        }
Example #2
0
        private IEnumerator CreateTorpedo1(IObserver <bool> observer)
        {
            Transform torpedoStraight = Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabTorpedoStraightController, Vector3.zero, Quaternion.identity) as Transform;
            Transform trams3          = new GameObject().transform;

            trams3.name           = "ProdSupportTorpedoPhase1";
            _prodSupportTorpedoP1 = new ProdSupportTorpedoP1(trams3, ((Component)torpedoStraight).GetComponent <TorpedoStraightController>());
            _prodSupportTorpedoP1.Initialize(_clsTorpedo, TorpedoParticle);
            yield return(new WaitForEndOfFrame());

            Transform trams2 = new GameObject().transform;

            trams2.name           = "ProdSupportTorpedoPhase2";
            _prodSupportTorpedoP2 = new ProdSupportTorpedoP2(trams2);
            _prodSupportTorpedoP2.Initialize(_clsTorpedo, TorpedoParticle);
            yield return(new WaitForEndOfFrame());

            _prodSupportTorpedoP2.CreateHpGauge(FleetType.Enemy);
            yield return(new WaitForEndOfFrame());

            observer.OnNext(value: true);
            observer.OnCompleted();
        }